Skip to content
Browse files

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


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

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 6115856 commit c0c953469715e004da307fdca04e740ea4c2f3d3 @malcolmt malcolmt committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 docs/model-api.txt
6 docs/model-api.txt
@@ -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

0 comments on commit c0c9534

Please sign in to comment.
Something went wrong with that request. Please try again.