summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2019-12-05 09:54:27 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-12-05 15:50:39 +0100
commit5d674eac871a306405b0fbbaeb17bbeba9c68bf3 (patch)
tree39f827b82af94b862d9e373d30fef52226e4bcdb /docs/ref
parent664521c56aa72e7749292e4b8d92f093421463b5 (diff)
Fixed #31039 -- Added support for contained_by lookup with AutoFields, SmallIntegerField, and DecimalField.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/postgres/fields.txt16
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt
index cd35a33ee6..e8fcef6215 100644
--- a/docs/ref/contrib/postgres/fields.txt
+++ b/docs/ref/contrib/postgres/fields.txt
@@ -738,10 +738,14 @@ operators ``@>``, ``<@``, and ``&&`` respectively.
<QuerySet [<Event: Soft play>]>
The ``contained_by`` lookup is also available on the non-range field types:
+:class:`~django.db.models.SmallAutoField`,
+:class:`~django.db.models.AutoField`, :class:`~django.db.models.BigAutoField`,
+:class:`~django.db.models.SmallIntegerField`,
:class:`~django.db.models.IntegerField`,
:class:`~django.db.models.BigIntegerField`,
-:class:`~django.db.models.FloatField`, :class:`~django.db.models.DateField`,
-and :class:`~django.db.models.DateTimeField`. For example::
+:class:`~django.db.models.DecimalField`, :class:`~django.db.models.FloatField`,
+:class:`~django.db.models.DateField`, and
+:class:`~django.db.models.DateTimeField`. For example::
>>> from psycopg2.extras import DateTimeTZRange
>>> Event.objects.filter(start__contained_by=DateTimeTZRange(
@@ -750,6 +754,14 @@ and :class:`~django.db.models.DateTimeField`. For example::
... )
<QuerySet [<Event: Soft play>]>
+.. versionchanged:: 3.1
+
+ Support for :class:`~django.db.models.SmallAutoField`,
+ :class:`~django.db.models.AutoField`,
+ :class:`~django.db.models.BigAutoField`,
+ :class:`~django.db.models.SmallIntegerField`, and
+ :class:`~django.db.models.DecimalField` was added.
+
.. fieldlookup:: rangefield.overlap
``overlap``