diff options
| author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2015-05-21 20:55:50 +0930 |
|---|---|---|
| committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2015-06-04 19:29:59 +0100 |
| commit | 7bda2d8ebc7833747363ac837fecb6535c817dcd (patch) | |
| tree | 3f4cc63e0a8420a9da9a5b9e5e52bcbe92ce811b /tests/postgres_tests/migrations | |
| parent | 5987b3c46d5a6948737627d294d95ed54d49eae6 (diff) | |
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.
Diffstat (limited to 'tests/postgres_tests/migrations')
| -rw-r--r-- | tests/postgres_tests/migrations/0002_create_test_models.py | 15 |
1 files changed, 15 insertions, 0 deletions
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 @@ -144,6 +144,21 @@ class Migration(migrations.Migration): ('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', }, bases=(models.Model,), |
