From 7bda2d8ebc7833747363ac837fecb6535c817dcd Mon Sep 17 00:00:00 2001 From: Marc Tamlyn Date: Thu, 21 May 2015 20:55:50 +0930 Subject: Fixed #24837 -- field__contained_by=Range Provide `contained_by` lookups for the equivalent single valued fields related to the range field types. This acts as the opposite direction to rangefield__contains. With thanks to schinckel for the idea and initial tests. --- .../postgres_tests/migrations/0002_create_test_models.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/postgres_tests/migrations') diff --git a/tests/postgres_tests/migrations/0002_create_test_models.py b/tests/postgres_tests/migrations/0002_create_test_models.py index 4eb2154f02..f1d06cc2d9 100644 --- a/tests/postgres_tests/migrations/0002_create_test_models.py +++ b/tests/postgres_tests/migrations/0002_create_test_models.py @@ -143,6 +143,21 @@ class Migration(migrations.Migration): ('timestamps', DateTimeRangeField(null=True, blank=True)), ('dates', DateRangeField(null=True, blank=True)), ], + options={ + 'required_db_vendor': 'postgresql' + }, + bases=(models.Model,) + ), + migrations.CreateModel( + name='RangeLookupsModel', + fields=[ + ('parent', models.ForeignKey('postgres_tests.RangesModel', blank=True, null=True)), + ('integer', models.IntegerField(blank=True, null=True)), + ('big_integer', models.BigIntegerField(blank=True, null=True)), + ('float', models.FloatField(blank=True, null=True)), + ('timestamp', models.DateTimeField(blank=True, null=True)), + ('date', models.DateField(blank=True, null=True)), + ], options={ 'required_db_vendor': 'postgresql', }, -- cgit v1.3