mirror of
https://github.com/django/django.git
synced 2025-07-19 03:05:32 +00:00
Instead of using DjangoJSONEncoder, use base_field's value_to_string.
Note this means the serialization of e.g. IntegerRangeField now has strings for lower and upper, so use to_python when they came back in (same behaviour as ArrayField, hopefully, from where I also got the set_attributes_from_name function).
This commit is contained in:
parent
2926559cce
commit
86d9b10dc3
4 changed files with 24 additions and 13 deletions
|
@ -291,7 +291,7 @@ class TestQueringWithRanges(TestCase):
|
|||
@skipUnlessPG92
|
||||
class TestSerialization(TestCase):
|
||||
test_data = (
|
||||
'[{"fields": {"ints": "{\\"upper\\": 10, \\"lower\\": 0, '
|
||||
'[{"fields": {"ints": "{\\"upper\\": \\"10\\", \\"lower\\": \\"0\\", '
|
||||
'\\"bounds\\": \\"[)\\"}", "floats": "{\\"empty\\": true}", '
|
||||
'"bigints": null, "timestamps": "{\\"upper\\": \\"2014-02-02T12:12:12\\", '
|
||||
'\\"lower\\": \\"2014-01-01T00:00:00\\", \\"bounds\\": \\"[)\\"}", '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue