Skip to content

Commit 2095446

Browse files
russozcarltongibson
authored andcommitted
Fix in documentation (#5611)
- model serializers now must provide either "fields" or "exclude" as attribute
1 parent 2531998 commit 2095446

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/api-guide/serializers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,8 @@ The names in the `fields` and `exclude` attributes will normally map to model fi
493493

494494
Alternatively names in the `fields` options can map to properties or methods which take no arguments that exist on the model class.
495495

496+
Since version 3.3.0, it is **mandatory** to provide one of the attributes `fields` or `exclude`.
497+
496498
## Specifying nested serialization
497499

498500
The default `ModelSerializer` uses primary keys for relationships, but you can also easily generate nested representations using the `depth` option:

0 commit comments

Comments
 (0)