Fixed #25995 -- Added an encoder option to JSONField

Thanks Berker Peksag and Tim Graham for the reviews.
This commit is contained in:
Claude Paroz 2016-08-11 21:05:52 +02:00
parent 989f6108d3
commit 13c3e5d5a0
7 changed files with 98 additions and 10 deletions

View file

@ -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