nonefield package¶
Subpackages¶
Submodules¶
nonefield.fields module¶
-
class
nonefield.fields.
NoneField
(*, required=True, widget=None, label=None, initial=None, help_text='', error_messages=None, show_hidden_initial=False, validators=(), localize=False, disabled=False, label_suffix=None)[source]¶ Bases:
django.forms.fields.Field
NoneField.
To be used with content elements like text or images, that need to be present, for instance, in between form input elements.
-
bound_data
(data, initial)[source]¶ Bound data.
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.
For most fields, this will simply be data; FileFields need to handle it a bit differently.
-
clean
(value)[source]¶ Validate the given value and return its “cleaned” value as an appropriate Python object. Raise ValidationError for any errors.
-
widget
¶ alias of
nonefield.widgets.NoneWidget
-