Small doc style fixes

This commit is contained in:
Ryan P Kilby 2016-11-08 11:50:44 -05:00
parent 9fb50e5b60
commit f9c28386ab
3 changed files with 10 additions and 4 deletions

View File

@ -11,7 +11,9 @@ Defines a class level attribute ``ISO_8601`` as constant for the format.
Sets ``input_formats = [ISO_8601]`` — this means that by default ``IsoDateTimeField`` will **only** parse ISO 8601 formated dates.
You may set ``input_formats`` to your list of required formats as per the `DateTimeField Docs`_, using the ``ISO_8601`` class level attribute to specify the ISO 8601 format. ::
You may set ``input_formats`` to your list of required formats as per the `DateTimeField Docs`_, using the ``ISO_8601`` class level attribute to specify the ISO 8601 format.
.. code-block:: python
f = IsoDateTimeField()
f.input_formats = [IsoDateTimeField.ISO_8601] + DateTimeField.input_formats

View File

@ -92,6 +92,6 @@ For example, you could add verbose output for "exact" lookups.
FILTERS_STRICTNESS
------------------
DEFAULT: ``STRICTNESS.RETURN_NO_RESULTS``
Default: ``STRICTNESS.RETURN_NO_RESULTS``
Set the global default for FilterSet :ref:`strictness <strict>`.

View File

@ -30,7 +30,9 @@ placeholders:
This widget converts its input into Python's True/False values. It will convert
all case variations of ``True`` and ``False`` into the internal Python values.
To use it, pass this into the ``widgets`` argument of the ``BooleanFilter``::
To use it, pass this into the ``widgets`` argument of the ``BooleanFilter``:
.. code-block:: python
active = BooleanFilter(widget=BooleanWidget())
@ -54,6 +56,8 @@ This widget is used with ``RangeFilter`` and its subclasses. It generates two
form input elements which generally act as start/end values in a range.
Under the hood, it is django's ``forms.TextInput`` widget and excepts
the same arguments and values. To use it, pass it to ``widget`` argument of
a ``RangeField``::
a ``RangeField``:
.. code-block:: python
date_range = DateFromToRangeFilter(widget=RangeWidget(attrs={'placeholder': 'YYYY/MM/DD'}))