summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-05-11 00:01:40 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-05-11 00:01:40 +0000
commitbc07a498fe789ed5c4057d56bac6ba50d7296ed1 (patch)
tree92b731955fe41d38dfb90f85d33d8adacbc94e87 /docs/ref
parent0d930ee0e647cdc46517971a8b84a304adb1178e (diff)
[1.0.X] Fixed #10792 -- Ensured that ModelChoiceFields don't provide an empty option when the underlying field has blank=False and there is a default value available. Thanks to carljm for the report and patch.
Merge of r10729 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/forms/fields.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index dbb87f6012..09aef7d29c 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -752,6 +752,10 @@ example::
# No empty label
field2 = forms.ModelChoiceField(queryset=..., empty_label=None)
+ Note that if a ``ModelChoiceField`` is required and has a default
+ initial value, no empty choice is created (regardless of the value
+ of ``empty_label``).
+
``ModelMultipleChoiceField``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~