You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api-guide/fields.md
-8
Original file line number
Diff line number
Diff line change
@@ -68,14 +68,6 @@ When serializing the instance, default will be used if the object attribute or d
68
68
69
69
Note that setting a `default` value implies that the field is not required. Including both the `default` and `required` keyword arguments is invalid and will raise an error.
70
70
71
-
Notes regarding default value propagation from model to serializer:
72
-
73
-
All the default values from model will pass as default to the serializer and the options method.
74
-
75
-
If the default is callable then it will be propagated to & evaluated every time in the serializer but not in options method.
76
-
77
-
If the value for given field is not given then default value will be present in the serializer and available in serializer's methods. Specified validation on given field will be evaluated on default value as that field will be present in the serializer.
78
-
79
71
### `allow_null`
80
72
81
73
Normally an error will be raised if `None` is passed to a serializer field. Set this keyword argument to `True` if `None` should be considered a valid value.
0 commit comments