categories.base.CategoryBaseAdminForm

CategoryBaseAdminForm#

class categories.base.CategoryBaseAdminForm(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)[source]#

Base admin form for categories.

Form fields:

Methods

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_p()

Return this form rendered as HTML <p>s.

as_table()

Return this form rendered as HTML <tr>s -- excluding the <table></table>.

as_ul()

Return this form rendered as HTML <li>s -- excluding the <ul></ul>.

clean()

Clean the data passed from the admin interface.

clean_slug()

Prune and transliterate the slug.

full_clean()

Clean all of self.data and populate self._errors and self.cleaned_data.

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.

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

changed_data

default_renderer

errors

Return an ErrorDict for the data provided for the form.

field_order

media

Return all media required to render the widgets on this form.

prefix

use_required_attribute