Author: gabrielhurley
Date: 2010-10-14 05:03:08 -0500 (Thu, 14 Oct 2010)
New Revision: 14214

Modified:
   django/trunk/docs/ref/forms/fields.txt
Log:
Fixed #5327 -- Added standardized field information to ModelChoiceField and 
ModelMultipleChoiceField documentation. Thanks to danielrubio for the report 
and PhiR for the text.

Modified: django/trunk/docs/ref/forms/fields.txt
===================================================================
--- django/trunk/docs/ref/forms/fields.txt      2010-10-14 01:40:39 UTC (rev 
14213)
+++ django/trunk/docs/ref/forms/fields.txt      2010-10-14 10:03:08 UTC (rev 
14214)
@@ -856,6 +856,12 @@
 
 .. class:: ModelChoiceField(**kwargs)
 
+    * Default widget: ``Select``
+    * Empty value: ``None``
+    * Normalizes to: A model instance.
+    * Validates that the given id exists in the queryset.
+    * Error message keys: ``required``, ``invalid_choice``
+
 Allows the selection of a single model object, suitable for
 representing a foreign key.  A single argument is required:
 
@@ -901,6 +907,14 @@
 
 .. class:: ModelMultipleChoiceField(**kwargs)
 
+    * Default widget: ``SelectMultiple``
+    * Empty value: ``[]`` (an empty list) 
+    * Normalizes to: A list of model instances.
+    * Validates that every id in the given list of values exists in the
+      queryset.
+    * Error message keys: ``required``, ``list``, ``invalid_choice``, 
+      ``invalid_pk_value``
+
 Allows the selection of one or more model objects, suitable for
 representing a many-to-many relation. As with :class:`ModelChoiceField`,
 you can use ``label_from_instance`` to customize the object

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to