Add support for serializing django Models
Review Request #7821 — Created Dec. 22, 2015 and submitted — Latest diff uploaded
Django Models with a
to_json
method can now be serialized with the
DjbletsJSONEncoder
. Theto_json
method should return a
JSON-serializable object (such a dict, list, or string) that will then
be serialized by the encoder. Unit tests have been added to test this
behaviour.
- Ran unit tests.
Diff Revision 2
This is not the most recent revision of the diff. The latest diff is revision 4. See what's changed.
orig
1
2
3
4
djblets/util/serializers.py |
---|
djblets/util/tests.py |
---|
djblets/webapi/encoders.py |
---|