Ticket #5327: 5327.diff
File 5327.diff, 1.6 KB (added by , 17 years ago) |
---|
-
docs/newforms.txt
1106 1106 * Validates that the given value exists in the list of choices. 1107 1107 1108 1108 Takes one extra argument, ``choices``, which is an iterable (e.g., a list or 1109 tuple) of 2-tuples to use as choices for this field. 1109 tuple) of 2-tuples to use as choices for this field. The first item of each tuple 1110 will be used for the value and the second for the display. The normalized value 1111 will be the first item of the tuple corresponding to the entry selected by the user. 1110 1112 1113 ``ModelChoiceField`` 1114 ~~~~~~~~~~~~~~~ 1115 1116 * Default widget: ``Select`` 1117 * Empty value: ``None`` 1118 * Normalizes to: An instance. 1119 * Validates that the given id exists in the queryset. 1120 1121 Takes one extra argument, ``queryset``, which is QuerySet containing the 1122 instances to choose. The instances' ``__unicode__`` method will be used for display. 1123 1111 1124 ``DateField`` 1112 1125 ~~~~~~~~~~~~~ 1113 1126 … … 1255 1268 Takes one extra argument, ``choices``, which is an iterable (e.g., a list or 1256 1269 tuple) of 2-tuples to use as choices for this field. 1257 1270 1271 ``ModelMultipleChoiceField`` 1272 ~~~~~~~~~~~~~~~ 1273 1274 * Default widget: ``SelectMultiple`` 1275 * Empty value: ``[]`` (an empty list) 1276 * Normalizes to: A list of instances. 1277 * Validates that every id in the given list of values exists in the queryset. 1278 1279 Takes one extra argument, ``queryset``, which is QuerySet containing the 1280 instances to choose. The instances' ``__unicode__`` method will be used for display. 1281 1282 1258 1283 ``NullBooleanField`` 1259 1284 ~~~~~~~~~~~~~~~~~~~~ 1260 1285