diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2016-05-18 07:30:42 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-06-13 09:14:36 -0400 |
| commit | 267dc4adddd2882182f71a7f285a06b1d4b15af0 (patch) | |
| tree | 085fbeac6fa9139c5214bc16b46535cde690733d /docs/topics/forms | |
| parent | f2c0eb19e961f5864573251e70bdcdecd0250aed (diff) | |
Fixed #4136 -- Made ModelForm save empty values for nullable CharFields as NULL.
Previously, empty values were saved as strings.
Diffstat (limited to 'docs/topics/forms')
| -rw-r--r-- | docs/topics/forms/modelforms.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index 938516050a..9dcb2e3e53 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -66,7 +66,9 @@ Model field Form field :class:`CharField` :class:`~django.forms.CharField` with ``max_length`` set to the model field's - ``max_length`` + ``max_length`` and + :attr:`~django.forms.CharField.empty_value` + set to ``None`` if ``null=True``. :class:`CommaSeparatedIntegerField` :class:`~django.forms.CharField` |
