Fixed #4351 -- Attempted to make it easier for readers to see the difference

between null and blank if they are reading from top to bottom.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5351 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-05-26 09:17:38 +00:00
parent 611585665a
commit c0c9534697
1 changed files with 4 additions and 2 deletions

View File

@ -463,8 +463,10 @@ If ``True``, Django will store empty values as ``NULL`` in the database.
Default is ``False``.
Note that empty string values will always get stored as empty strings, not
as ``NULL`` -- so use ``null=True`` for non-string fields such as integers,
booleans and dates.
as ``NULL``. Only use ``null=True`` for non-string fields such as integers,
booleans and dates. For both types of fields, you will also need to set
``blank=True`` if you wish to permit empty values in forms, as the ``null``
parameter only affects database storage (see blank_, below).
Avoid using ``null`` on string-based fields such as ``CharField`` and
``TextField`` unless you have an excellent reason. If a string-based field