Skip to content

Commit fb0ada6

Browse files
author
Carlton Gibson
authored
Merge pull request #470 from blueyed/fix-docs
Minor doc fixes
2 parents 3ea3e4c + f31e4c1 commit fb0ada6

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

docs/ref/filters.txt

+11-10
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Matches on a date and time. Used with ``DateTimeField`` by default.
274274

275275
Uses ``IsoDateTimeField`` to support filtering on ISO 8601 formatted dates, as are often used in APIs, and are employed by default by Django REST Framework.
276276

277-
Example. ::
277+
Example::
278278

279279
class F(FilterSet):
280280
"""Filter for Books by date published, using ISO 8601 formatted dates"""
@@ -301,10 +301,11 @@ and week designators, e.g. 'P3DT10H22M').
301301
Similar to a ``ChoiceFilter`` except it works with related models, used for
302302
``ForeignKey`` by default.
303303

304-
If automatically instantiated ``ModelChoiceFilter`` will use the default ``QuerySet`` for the
305-
related field. If manually instantiated you **must** provide the ``queryset`` kwarg.
304+
If automatically instantiated, ``ModelChoiceFilter`` will use the default
305+
``QuerySet`` for the related field. If manually instantiated you **must**
306+
provide the ``queryset`` kwarg.
306307

307-
Example. ::
308+
Example::
308309

309310
class F(FilterSet):
310311
"""Filter for books by author"""
@@ -320,9 +321,9 @@ Example. ::
320321
Similar to a ``MultipleChoiceFilter`` except it works with related models, used
321322
for ``ManyToManyField`` by default.
322323

323-
As with ``ModelChoiceFilter``, if automatically instantiated ``ModelMultipleChoiceFilter`` will use
324-
the default ``QuerySet`` for the related field. If manually instantiated you **must** provide the
325-
``queryset`` kwarg.
324+
As with ``ModelChoiceFilter``, if automatically instantiated,
325+
``ModelMultipleChoiceFilter`` will use the default ``QuerySet`` for the related
326+
field. If manually instantiated you **must** provide the ``queryset`` kwarg.
326327

327328
``NumberFilter``
328329
~~~~~~~~~~~~~~~~
@@ -516,7 +517,7 @@ this filter class is used in conjunction with another filter class, as this
516517
class **only** validates that the incoming value is comma-separated. The secondary
517518
filter is then used to validate the individual values.
518519

519-
Example. ::
520+
Example::
520521

521522
class NumberInFilter(BaseInFilter, NumericFilter):
522523
pass
@@ -543,7 +544,7 @@ This is a base class used for creating RANGE lookup filters. It behaves
543544
identically to ``BaseInFilter`` with the exception that it expects only two
544545
comma-separated values.
545546

546-
Example. ::
547+
Example::
547548

548549
class NumberRangeFilter(BaseInFilter, NumericFilter):
549550
pass
@@ -571,7 +572,7 @@ This is a ``Filter`` that will allow you to run a method that exists on the filt
571572
this filter is a property of. Set the `action` to a string that will map to a method on the
572573
filter set class. `action` will default to ``filter_{value-of-name-attribute}``
573574

574-
Example. ::
575+
Example::
575576

576577
class F(FilterSet):
577578
"""Filter for Books by if books are published or not"""

0 commit comments

Comments
 (0)