From 242a65b5daae69a8ea6d98de88ec35b47421397a Mon Sep 17 00:00:00 2001 From: jacklinke Date: Sun, 26 May 2024 18:28:34 -0400 Subject: [PATCH] Make sure code blocks in docstrings get formatted correctly --- src/django_segments/models/segment.py | 3 +++ src/django_segments/models/span.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/django_segments/models/segment.py b/src/django_segments/models/segment.py index 2d20847..c7236c6 100644 --- a/src/django_segments/models/segment.py +++ b/src/django_segments/models/segment.py @@ -27,6 +27,9 @@ class AbstractSegment(models.Model, metaclass=AbstractSegmentMetaclass): and foreign key field instances in the concrete subclass. Examples: + + .. code-block:: python + class MySegment(AbstractSegment): segment_span = models.ForeignKey(MySpan, on_delete=models.CASCADE) diff --git a/src/django_segments/models/span.py b/src/django_segments/models/span.py index 14f4c49..2ae68d3 100644 --- a/src/django_segments/models/span.py +++ b/src/django_segments/models/span.py @@ -27,7 +27,10 @@ class AbstractSpan(models.Model, metaclass=AbstractSegmentMetaclass): When the concrete subclass is created, the initial_range_field and current_range_field attributes set to the range field instances. These attributes can be used to access the range field instances in the concrete subclass. - Examples: + Example: + + .. code-block:: python + class MySpan(AbstractSpan): my_range_field = DateTimeRangeField() initial_range_field_name = 'my_range_field'