From 20954469b2938f2e701f11e0398815c557bafa67 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky Date: Mon, 20 Nov 2017 21:07:36 +1300 Subject: [PATCH] Fix in documentation (#5611) - model serializers now must provide either "fields" or "exclude" as attribute --- docs/api-guide/serializers.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md index 0e235c88d..021ef1c38 100644 --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -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: