mirror of
https://github.com/django/django.git
synced 2025-08-30 15:27:40 +00:00
Fixed #25995 -- Added an encoder option to JSONField
Thanks Berker Peksag and Tim Graham for the reviews.
This commit is contained in:
parent
989f6108d3
commit
13c3e5d5a0
7 changed files with 98 additions and 10 deletions
|
@ -23,6 +23,10 @@ except ImportError:
|
|||
})
|
||||
return name, path, args, kwargs
|
||||
|
||||
class DummyJSONField(models.Field):
|
||||
def __init__(self, encoder=None, **kwargs):
|
||||
super(DummyJSONField, self).__init__(**kwargs)
|
||||
|
||||
ArrayField = DummyArrayField
|
||||
BigIntegerRangeField = models.Field
|
||||
DateRangeField = models.Field
|
||||
|
@ -30,5 +34,5 @@ except ImportError:
|
|||
FloatRangeField = models.Field
|
||||
HStoreField = models.Field
|
||||
IntegerRangeField = models.Field
|
||||
JSONField = models.Field
|
||||
JSONField = DummyJSONField
|
||||
SearchVectorField = models.Field
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue