Ticket #11374: boolfield_patch.diff
File boolfield_patch.diff, 1.2 KB (added by , 15 years ago) |
---|
-
docs/ref/forms/fields.txt
275 275 * Default widget: ``CheckboxInput`` 276 276 * Empty value: ``False`` 277 277 * Normalizes to: A Python ``True`` or ``False`` value. 278 * Validates that the check box is checked (i.e. the value is ``True``) if278 * Validates that the value is ``True`` (e.g. the check box is checked) if 279 279 the field has ``required=True``. 280 280 * Error message keys: ``required`` 281 281 … … 287 287 .. note:: 288 288 289 289 Since all ``Field`` subclasses have ``required=True`` by default, the 290 validation condition here is important. If you want to include a checkbox 291 in your form that can be either checked or unchecked, you must remember to 292 pass in ``required=False`` when creating the ``BooleanField``. 290 validation condition here is important. If you want to include a boolean 291 in your form that can be either ``True`` or ``False`` (e.g. a checked or 292 unchecked checkbox), you must remember to pass in ``required=False`` when 293 creating the ``BooleanField``. 293 294 294 295 ``CharField`` 295 296 ~~~~~~~~~~~~~