summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-26 09:17:38 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-26 09:17:38 +0000
commitc0c953469715e004da307fdca04e740ea4c2f3d3 (patch)
tree295c863decbc478c977e43a7326f17a205c5a2d6
parent611585665a49d182b1b9be3521398cac3121ade7 (diff)
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
-rw-r--r--docs/model-api.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/model-api.txt b/docs/model-api.txt
index ae1c37fc8f..ce2aeb979c 100644
--- a/docs/model-api.txt
+++ b/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