diff options
| author | Tom Christie | 2014-12-19 16:58:35 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-12-19 16:58:35 +0000 | 
| commit | 48d15f6ff8a13aafd5b4977c8d1b4b7fe70b4f6a (patch) | |
| tree | 65d13a78048219d73c4a85559e419751a8889efb | |
| parent | 62f78dfbf1b1dfa2d6406a4be5b83bc69267e851 (diff) | |
| download | django-rest-framework-48d15f6ff8a13aafd5b4977c8d1b4b7fe70b4f6a.tar.bz2 | |
Stub out the documentation
| -rw-r--r-- | docs/api-guide/serializers.md | 26 | 
1 files changed, 26 insertions, 0 deletions
| diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md index b9f0e7bc..4d3dfa31 100644 --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -567,6 +567,32 @@ The inner `Meta` class on serializers is not inherited from parent classes by de  Typically we would recommend *not* using inheritance on inner Meta classes, but instead declaring all options explicitly. +## Advanced `ModelSerializer` usage + +The ModelSerializer class also exposes an API that you can override in order to alter how serializer fields are automatically determined when instantiating the serializer. + +#### `.serializer_field_mapping` + +A mapping of Django model classes to REST framework serializer classes. You can override this mapping to alter the default serializer classes that should be used for each model class. + +#### `.serializer_relational_field` + +This property should be the serializer field class, that is used for relational fields by default. For `ModelSerializer` this defaults to `PrimaryKeyRelatedField`. For `HyperlinkedModelSerializer` this defaults to `HyperlinkedRelatedField`. + +#### The build field methods + +#### `build_standard_field(**kwargs)` + +#### `build_relational_field(**kwargs)` + +#### `build_nested_field(**kwargs)` + +#### `build_property_field(**kwargs)` + +#### `build_url_field(**kwargs)` + +#### `build_unknown_field(**kwargs)` +  ---  # HyperlinkedModelSerializer | 
