Skip to content

Commit

Permalink
Make sure code blocks in docstrings get formatted correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklinke committed May 26, 2024
1 parent 0e8dabc commit 242a65b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/django_segments/models/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion src/django_segments/models/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 242a65b

Please sign in to comment.