From c0c953469715e004da307fdca04e740ea4c2f3d3 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sat, 26 May 2007 09:17:38 +0000 Subject: [PATCH] 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 --- docs/model-api.txt | 6 ++++-- 1 file 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