diff options
| author | Tom Christie | 2014-11-20 13:44:35 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-11-20 13:44:35 +0000 |
| commit | d80d58e91a62941a1bdad4263886a109b6003e53 (patch) | |
| tree | 9040101c7d3f1f717e4bf57197d8fb76fcc5d575 /rest_framework/fields.py | |
| parent | 096c58b784faee6b3c71201ad8b2708f7ccd5f7f (diff) | |
| parent | 6ec96d0bac1e738aceec9f8c21282c172120c7ac (diff) | |
| download | django-rest-framework-d80d58e91a62941a1bdad4263886a109b6003e53.tar.bz2 | |
Merge branch 'master' into 3.0-beta
Diffstat (limited to 'rest_framework/fields.py')
| -rw-r--r-- | rest_framework/fields.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index bb43708d..778bc718 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -181,6 +181,9 @@ class Field(object): self.style = {} if style is None else style self.allow_null = allow_null + if allow_null and self.default_empty_html is empty: + self.default_empty_html = None + if validators is not None: self.validators = validators[:] @@ -495,6 +498,7 @@ class CharField(Field): } initial = '' coerce_blank_to_null = False + default_empty_html = '' def __init__(self, **kwargs): self.allow_blank = kwargs.pop('allow_blank', False) |
