class documentation
class NullBooleanField(BooleanField): (source)
A field whose valid values are None, True, and False. Clean invalid values to None.
Method | to |
Explicitly check for the string 'True' and 'False', which is what a hidden field will submit for True and False, for 'true' and 'false', which are likely to be returned by JavaScript serializations of forms, and for '1' and '0', which is what a RadioField will submit... |
Method | validate |
Undocumented |
Inherited from BooleanField
:
Method | has |
Return True if data differs from initial. |
Inherited from Field
(via BooleanField
):
Method | __deepcopy__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | bound |
Return the value that should be shown for this field on render of a bound form, given the submitted POST data for the field and the initial data, if any. |
Method | clean |
Validate the given value and return its "cleaned" value as an appropriate Python object. Raise ValidationError for any errors. |
Method | get |
Return a BoundField instance that will be used when accessing the form field in a template. |
Method | prepare |
Undocumented |
Method | run |
Undocumented |
Method | widget |
Given a Widget instance (*not* a Widget class), return a dictionary of any HTML attributes that should be added to the Widget, based on this Field. |
Class Variable | default |
Undocumented |
Class Variable | default |
Undocumented |
Class Variable | empty |
Undocumented |
Instance Variable | disabled |
Undocumented |
Instance Variable | error |
Undocumented |
Instance Variable | help |
Undocumented |
Instance Variable | initial |
Undocumented |
Instance Variable | label |
Undocumented |
Instance Variable | label |
Undocumented |
Instance Variable | localize |
Undocumented |
Instance Variable | required |
Undocumented |
Instance Variable | show |
Undocumented |
Instance Variable | validators |
Undocumented |
Instance Variable | widget |
Undocumented |
Explicitly check for the string 'True' and 'False', which is what a hidden field will submit for True and False, for 'true' and 'false', which are likely to be returned by JavaScript serializations of forms, and for '1' and '0', which is what a RadioField will submit. Unlike the Booleanfield, this field must check for True because it doesn't use the bool() function.