From 5d674eac871a306405b0fbbaeb17bbeba9c68bf3 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Thu, 5 Dec 2019 09:54:27 +0100 Subject: Fixed #31039 -- Added support for contained_by lookup with AutoFields, SmallIntegerField, and DecimalField. --- docs/ref/contrib/postgres/fields.txt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'docs/ref') 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. ]> 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:: ... ) ]> +.. 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`` -- cgit v1.3