The horizon.forms.base ModuleΒΆ

class horizon.forms.base.DateForm(*args, **kwargs)[source]

Bases: django.forms.forms.Form

A simple form for selecting a range of time.

DateForm.base_fields = OrderedDict([('start', <django.forms.fields.DateField object at 0x33d5b90>), ('end', <django.forms.fields.DateField object at 0x33d5c50>)])
DateForm.declared_fields = OrderedDict([('start', <django.forms.fields.DateField object at 0x33d5b90>), ('end', <django.forms.fields.DateField object at 0x33d5c50>)])
DateForm.media
class horizon.forms.base.SelfHandlingForm(request, *args, **kwargs)[source]

Bases: horizon.forms.base.SelfHandlingMixin, django.forms.forms.Form

A base Form class which includes processing logic in its subclasses.

SelfHandlingForm.api_error(message)[source]

Adds an error to the form’s error dictionary after validation based on problems reported via the API. This is useful when you wish for API errors to appear as errors on the form rather than using the messages framework.

SelfHandlingForm.base_fields = OrderedDict()
SelfHandlingForm.declared_fields = OrderedDict()
SelfHandlingForm.media
SelfHandlingForm.required_css_class = 'required'
SelfHandlingForm.set_warning(message)[source]

Sets a warning on the form.

Unlike NON_FIELD_ERRORS, this doesn’t fail form validation.

class horizon.forms.base.SelfHandlingMixin(request, *args, **kwargs)[source]

Bases: object

Previous topic

The horizon.forms Module

Next topic

The horizon.tables.formset Module

This Page