Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ference

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
  • Loading branch information...
commit c0c953469715e004da307fdca04e740ea4c2f3d3 1 parent 6115856
Malcolm Tredinnick malcolmt authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 docs/model-api.txt
6 docs/model-api.txt
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.