Add support for serializing django Models
Review Request #7821 — Created Dec. 22, 2015 and submitted
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.
-
Tool: Pyflakes Processed Files: djblets/util/tests.py djblets/util/serializers.py djblets/webapi/encoders.py Tool: PEP8 Style Checker Processed Files: djblets/util/tests.py djblets/util/serializers.py djblets/webapi/encoders.py Tool: PEP8 Style Checker Processed Files: djblets/util/tests.py djblets/util/serializers.py djblets/webapi/encoders.py Tool: Pyflakes Processed Files: djblets/util/tests.py djblets/util/serializers.py djblets/webapi/encoders.py
-
-
-
Tool: PEP8 Style Checker Processed Files: djblets/util/tests.py djblets/util/serializers.py djblets/webapi/encoders.py Tool: Pyflakes Processed Files: djblets/util/tests.py djblets/util/serializers.py djblets/webapi/encoders.py