diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2019-12-05 09:54:27 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-12-05 15:50:39 +0100 |
| commit | 5d674eac871a306405b0fbbaeb17bbeba9c68bf3 (patch) | |
| tree | 39f827b82af94b862d9e373d30fef52226e4bcdb /docs | |
| parent | 664521c56aa72e7749292e4b8d92f093421463b5 (diff) | |
Fixed #31039 -- Added support for contained_by lookup with AutoFields, SmallIntegerField, and DecimalField.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/postgres/fields.txt | 16 | ||||
| -rw-r--r-- | docs/releases/3.1.txt | 7 |
2 files changed, 21 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`` diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt index 631978d0ac..ec107bf29b 100644 --- a/docs/releases/3.1.txt +++ b/docs/releases/3.1.txt @@ -90,6 +90,13 @@ Minor features :lookup:`rangefield.upper_inc`, and :lookup:`rangefield.upper_inf` allows querying :class:`~django.contrib.postgres.fields.RangeField` by a bound type. +* :lookup:`rangefield.contained_by` now supports + :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`. + :mod:`django.contrib.redirects` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
