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 = {'start': <django.forms.fields.DateField object at 0xf556f42c>, 'end': <django.forms.fields.DateField object at 0xf556f68c>}
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 = {}
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 Module

Next topic

Horizon 2012.1 “Essex”

This Page