Forms

class lotus.forms.AlbumAdminForm(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]
property media

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

class lotus.forms.AlbumItemAdminForm(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]
property media

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

class lotus.forms.ArticleAdminForm(*args, **kwargs)[source]

Article form for admin.

clean()[source]

Add custom global input cleaner validations.

property media

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

class lotus.forms.CategoryAdminForm(*args, **kwargs)[source]

Category form for admin.

Note

Form is customized to manage treebeard fields for our constraint requirements.

get_original_relation_queryset()[source]

Get available categories queryset for original field selection.

Returns:

Queryset of available category. Basically only the original categories are available. And in addition when form is in edition mode, queryset is filtered with some constraints to avoid selecting the category itself, a translation or object with the same language.

Return type:

Queryset

clean()[source]

Add custom global input cleaner validations.

WARNING: It seems it is possible to define an “original” category even if the current category itself has translations which should make it as the original for these translations, so the current category could not be a translation. This is the same behavior with articles. Issue #79.

property media

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

class lotus.forms.TranslateToLangForm(*args, **kwargs)[source]

A very basic non model form just for listing available language choices.

property media

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