diff options
| author | Yuri Prezument | 2014-01-05 15:58:46 +0200 | 
|---|---|---|
| committer | Yuri Prezument | 2014-01-12 10:53:54 +0200 | 
| commit | 6e622d644c9b55b905e24497f0fb818d557fd970 (patch) | |
| tree | c0e8925e313887ec67092bf63a5fcb2f6dba4aca /docs/api-guide/fields.md | |
| parent | e88e3c6ae163029f0fe564dd214235ab350dbfc9 (diff) | |
| download | django-rest-framework-6e622d644c9b55b905e24497f0fb818d557fd970.tar.bz2 | |
CharField - add allow_null argument
Diffstat (limited to 'docs/api-guide/fields.md')
| -rw-r--r-- | docs/api-guide/fields.md | 7 | 
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 | 
