mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #27147 -- Allowed specifying bounds of tuple inputs for non-discrete range fields.
This commit is contained in:
committed by
Mariusz Felisiak
parent
52f6927d7f
commit
fc565cb539
@@ -26,14 +26,23 @@ except ImportError:
|
||||
})
|
||||
return name, path, args, kwargs
|
||||
|
||||
class DummyContinuousRangeField(models.Field):
|
||||
def __init__(self, *args, default_bounds='[)', **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
def deconstruct(self):
|
||||
name, path, args, kwargs = super().deconstruct()
|
||||
kwargs['default_bounds'] = '[)'
|
||||
return name, path, args, kwargs
|
||||
|
||||
ArrayField = DummyArrayField
|
||||
BigIntegerRangeField = models.Field
|
||||
CICharField = models.Field
|
||||
CIEmailField = models.Field
|
||||
CITextField = models.Field
|
||||
DateRangeField = models.Field
|
||||
DateTimeRangeField = models.Field
|
||||
DecimalRangeField = models.Field
|
||||
DateTimeRangeField = DummyContinuousRangeField
|
||||
DecimalRangeField = DummyContinuousRangeField
|
||||
HStoreField = models.Field
|
||||
IntegerRangeField = models.Field
|
||||
SearchVector = models.Expression
|
||||
|
||||
Reference in New Issue
Block a user