aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide
diff options
context:
space:
mode:
authorTom Christie2015-01-05 14:32:12 +0000
committerTom Christie2015-01-05 14:32:12 +0000
commitb6ca7248ebcf95a95e1911aa0b130f653b8bf690 (patch)
tree3da53011f0e215da5e13efcaf39223f88edfefce /docs/api-guide
parent8cf37449715c32c4a692667814466c7f32e8734f (diff)
downloaddjango-rest-framework-b6ca7248ebcf95a95e1911aa0b130f653b8bf690.tar.bz2
required=False allows omission of value for output. Closes #2342
Diffstat (limited to 'docs/api-guide')
-rw-r--r--docs/api-guide/fields.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index 946e355d..b3d274dd 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -41,6 +41,8 @@ Defaults to `False`
Normally an error will be raised if a field is not supplied during deserialization.
Set to false if this field is not required to be present during deserialization.
+Setting this to `False` also allows the object attribute or dictionary key to be omitted from output when serializing the instance. If the key is not present it will simply not be included in the output representation.
+
Defaults to `True`.
### `allow_null`