Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 7b16d15bcb5490c36ae37c74051b5e63 > files > 101

python-django-filter-0.11.0-6.mga7.noarch.rpm

Fields Reference
================

``IsoDateTimeField``
~~~~~~~~~~~~~~~~~~~~

Extends ``django.forms.DateTimeField`` to allow parsing ISO 8601 formated dates, in addition to existing formats

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. ::

    f = IsoDateTimeField()
    f.input_formats = [IsoDateTimeField.ISO_8601] + DateTimeField.input_formats


.. _`DateTimeField Docs`:https://docs.djangoproject.com/en/1.8/ref/forms/fields/#django.forms.DateTimeField.input_formats