[3.1.x] Fixed typo in docs/ref/contrib/postgres/fields.txt.
Backport of cdead4f013
from master
This commit is contained in:
parent
20ec568e46
commit
81ed126dff
|
@ -668,9 +668,11 @@ The ``contained_by`` lookup is also available on the non-range field types:
|
||||||
:class:`~django.db.models.DateTimeField`. For example::
|
:class:`~django.db.models.DateTimeField`. For example::
|
||||||
|
|
||||||
>>> from psycopg2.extras import DateTimeTZRange
|
>>> from psycopg2.extras import DateTimeTZRange
|
||||||
>>> Event.objects.filter(start__contained_by=DateTimeTZRange(
|
>>> Event.objects.filter(
|
||||||
|
... start__contained_by=DateTimeTZRange(
|
||||||
... timezone.now() - datetime.timedelta(hours=1),
|
... timezone.now() - datetime.timedelta(hours=1),
|
||||||
... timezone.now() + datetime.timedelta(hours=1),
|
... timezone.now() + datetime.timedelta(hours=1),
|
||||||
|
... ),
|
||||||
... )
|
... )
|
||||||
<QuerySet [<Event: Soft play>]>
|
<QuerySet [<Event: Soft play>]>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue