Customizable serialization.
Converts python objects into plain old native types suitable for serialization. In particular it handles models and querysets.
The output format is specified by setting a number of attributes on the class.
You may also override any of the serialization methods, to provide for more flexible behavior.
Valid output types include anything that may be directly rendered into json, xml etc...
Specify the fields to be serialized on a model or dict. Overrides include and exclude.
Fields to add to the default set to be serialized on a model/dict.
Fields to remove from the default set to be serialized on a model/dict.
A dict of key->name to use for the field keys.
The default serializer class to use for any related models.
The maximum depth to serialize to, or None.
Return the default list of field names/keys for a model instance/dict. These are used if fields is not given.
Keys serialize to their string value, unless they exist in the rename dict.
Convert a model field or dict value into a serializable representation.
Determine how objects should be serialized once depth is exceeded. The default behavior is to ignore the field.
Determine how objects should be serialized if recursion occurs. The default behavior is to ignore the field.