diff options
| author | Tom Christie | 2012-12-08 13:01:03 +0000 |
|---|---|---|
| committer | Tom Christie | 2012-12-08 13:01:03 +0000 |
| commit | ff01ae3571298b9da67f9b9583f0cb264676ed2b (patch) | |
| tree | f8ce14f078dcdb2a4a0e763f65599c4aa372c46f /docs/api-guide/fields.md | |
| parent | ac2720afcba7be5e937b5f0360a470701861baaa (diff) | |
| download | django-rest-framework-ff01ae3571298b9da67f9b9583f0cb264676ed2b.tar.bz2 | |
Version 2.1.82.1.8
Diffstat (limited to 'docs/api-guide/fields.md')
| -rw-r--r-- | docs/api-guide/fields.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index 1d4c34cb..50a09701 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -293,6 +293,7 @@ By default these fields are read-write, although you can change this behaviour u **Arguments**: * `queryset` - By default `ModelSerializer` classes will use the default queryset for the relationship. `Serializer` classes must either set a queryset explicitly, or set `read_only=True`. +* `null` - If set to `True`, the field will accept values of `None` or the emptystring for nullable relationships. ## SlugRelatedField / ManySlugRelatedField @@ -304,6 +305,7 @@ By default these fields read-write, although you can change this behaviour using * `slug_field` - The field on the target that should be used to represent it. This should be a field that uniquely identifies any given instance. For example, `username`. * `queryset` - By default `ModelSerializer` classes will use the default queryset for the relationship. `Serializer` classes must either set a queryset explicitly, or set `read_only=True`. +* `null` - If set to `True`, the field will accept values of `None` or the emptystring for nullable relationships. ## HyperlinkedRelatedField / ManyHyperlinkedRelatedField @@ -319,6 +321,7 @@ By default, `HyperlinkedRelatedField` is read-write, although you can change thi * `slug_field` - The field on the target that should be used for the lookup. Default is `'slug'`. * `pk_url_kwarg` - The named url parameter for the pk field lookup. Default is `pk`. * `slug_url_kwarg` - The named url parameter for the slug field lookup. Default is to use the same value as given for `slug_field`. +* `null` - If set to `True`, the field will accept values of `None` or the emptystring for nullable relationships. ## HyperLinkedIdentityField |
