moo.core.forms.VerbAdminForm
- class moo.core.forms.VerbAdminForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)
- __init__(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)
Methods
__init__([data, files, auto_id, prefix, ...])add_error(field, error)Update the content of self._errors.
add_initial_prefix(field_name)Add an 'initial' prefix for checking dynamic initial values.
add_prefix(field_name)Return the field name with a prefix appended, if this Form has a prefix set.
as_div()Render as <div> elements.
as_p()Render as <p> elements.
as_table()Render as <tr> elements excluding the surrounding <table> tag.
as_ul()Render as <li> elements excluding the surrounding <ul> tag.
clean()Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field.
full_clean()Clean all of self.data and populate self._errors and self.cleaned_data.
get_context()get_initial_for_field(field, field_name)Return initial data for field on form.
has_changed()Return True if data differs from initial.
has_error(field[, code])hidden_fields()Return a list of all the BoundField objects that are hidden fields.
is_multipart()Return True if the form needs to be multipart-encoded, i.e. it has FileInput, or False otherwise.
is_valid()Return True if the form has no errors, or False otherwise.
non_field_errors()Return an ErrorList of errors that aren't associated with a particular field -- i.e., from Form.clean().
order_fields(field_order)Rearrange the fields according to field_order.
render([template_name, context, renderer])save([commit])Save this form's self.instance object if commit=True.
validate_unique()Call the instance's validate_unique() method and update the form's validation errors if any were raised.
visible_fields()Return a list of BoundField objects that aren't hidden fields.
Attributes
base_fieldschanged_datadeclared_fieldsdefault_renderererrorsReturn an ErrorDict for the data provided for the form.
field_ordermediaReturn all media required to render the widgets on this form.
prefixtemplate_nametemplate_name_divtemplate_name_labeltemplate_name_ptemplate_name_tabletemplate_name_uluse_required_attribute