Fixed #4136 -- Made ModelForm save empty values for nullable CharFields as NULL.

Previously, empty values were saved as strings.
This commit is contained in:
Jon Dufresne 2016-05-18 07:30:42 -07:00 committed by Tim Graham
parent f2c0eb19e9
commit 267dc4addd
9 changed files with 66 additions and 18 deletions

View file

@ -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`