Fix in documentation

- model serializers now must provide either "fields" or "exclude" as attribute
This commit is contained in:
Alexei Znamensky 2017-11-20 15:06:55 +13:00
parent 9f66e8badd
commit 72aeb187ab

View File

@ -493,6 +493,8 @@ The names in the `fields` and `exclude` attributes will normally map to model fi
Alternatively names in the `fields` options can map to properties or methods which take no arguments that exist on the model class.
Since version 3.3.0, it is **mandatory** to provide one of the attributes `fields` or `exclude`.
## Specifying nested serialization
The default `ModelSerializer` uses primary keys for relationships, but you can also easily generate nested representations using the `depth` option: