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.

base_fields = OrderedDict([('start', <django.forms.fields.DateField object at 0x7f9f44119d50>), ('end', <django.forms.fields.DateField object at 0x7f9f440c3c10>)])
declared_fields = OrderedDict([('start', <django.forms.fields.DateField object at 0x7f9f44119d50>), ('end', <django.forms.fields.DateField object at 0x7f9f440c3c10>)])
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.

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.

base_fields = OrderedDict()
declared_fields = OrderedDict()
media
required_css_class = 'required'
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.fields Module

Next topic

The horizon.browsers.views Module

Project Source

This Page