Fixed typo in docs/ref/contrib/postgres/fields.txt.

This commit is contained in:
Thomas 2020-08-05 15:50:56 +02:00 committed by Mariusz Felisiak
parent 0a306f7da6
commit cdead4f013
1 changed files with 5 additions and 3 deletions

View File

@ -668,9 +668,11 @@ The ``contained_by`` lookup is also available on the non-range field types:
:class:`~django.db.models.DateTimeField`. For example::
>>> 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),
... ),
... )
<QuerySet [<Event: Soft play>]>