aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide
diff options
context:
space:
mode:
authorTom Christie2014-01-12 06:52:40 -0800
committerTom Christie2014-01-12 06:52:40 -0800
commit07cff7b37f23489579ad9effeea9365725b7cc82 (patch)
tree219a03e808f239c6ca7d5e270fb278b78788a0ad /docs/api-guide
parent52686420f4bf866064ee88a15903665f14289394 (diff)
parentcd9a4194ea4f4dc0e43a34485cd8a27eba44a39a (diff)
downloaddjango-rest-framework-07cff7b37f23489579ad9effeea9365725b7cc82.tar.bz2
Merge pull request #1348 from yprez/none-to-empty-string_2.4
Coerce None to empty string
Diffstat (limited to 'docs/api-guide')
-rw-r--r--docs/api-guide/fields.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index e05c0306..83825350 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -157,23 +157,24 @@ Corresponds to `django.db.models.fields.BooleanField`.
## CharField
A text representation, optionally validates the text to be shorter than `max_length` and longer than `min_length`.
+If `allow_none` is `False` (default), `None` values will be converted to an empty string.
Corresponds to `django.db.models.fields.CharField`
or `django.db.models.fields.TextField`.
-**Signature:** `CharField(max_length=None, min_length=None)`
+**Signature:** `CharField(max_length=None, min_length=None, allow_none=False)`
## URLField
Corresponds to `django.db.models.fields.URLField`. Uses Django's `django.core.validators.URLValidator` for validation.
-**Signature:** `CharField(max_length=200, min_length=None)`
+**Signature:** `CharField(max_length=200, min_length=None, allow_none=False)`
## SlugField
Corresponds to `django.db.models.fields.SlugField`.
-**Signature:** `CharField(max_length=50, min_length=None)`
+**Signature:** `CharField(max_length=50, min_length=None, allow_none=False)`
## ChoiceField