mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
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.
This commit is contained in:
@@ -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',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user