POI Categories

Forms for creating and modifying POI Category and POI Category Translation objects

POI Category Form

class integreat_cms.cms.forms.poi_categories.poi_category_form.POICategoryForm(**kwargs: Any)[source]

Bases: CustomModelForm

Form for creating and modifying POICategory objects

Form fields:

Parameters:

kwargs (Any)

property media[source]

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

POI Category Translation Form

class integreat_cms.cms.forms.poi_categories.poi_category_translation_form.BaseInlinePOICategoryTranslationFormSet(data=None, files=None, instance=None, save_as_new=False, prefix=None, queryset=None, **kwargs)[source]

Bases: BaseInlineFormSet

A formset for translations of POI categories

clean() None[source]

Make sure that at least one translation is given

Raises:

ValidationError – When not a single form contains a valid text

Return type:

None

get_form_kwargs(index: int) dict[str, dict[str, Language]][source]

Return additional keyword arguments for each individual formset form. (see get_form_kwargs() and Passing custom parameters to formset forms)

Parameters:

index (int) – The index of the initialized form (will be None if the form being constructed is a new empty form)

Returns:

The form kwargs

Return type:

dict[str, dict[str, Language]]

class integreat_cms.cms.forms.poi_categories.poi_category_translation_form.POICategoryTranslationForm(**kwargs: Any)[source]

Bases: CustomModelForm

Form for creating and modifying POI category translation objects

Form fields:

Parameters:

kwargs (Any)

__init__(**kwargs: Any) None[source]

Initialize POI category translation form

Parameters:

**kwargs (Any) – The supplied keyword arguments

Return type:

None

clean() dict[str, Any][source]

This method extends the clean()-method to delete translations with an empty name.

Returns:

The cleaned data (see Overriding the clean() method)

Return type:

dict[str, Any]

property media[source]

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

integreat_cms.cms.forms.poi_categories.poi_category_translation_form.poi_category_translation_formset_factory() type[source]

Build the formset class

Returns:

The POICategoryTranslationFormset class

Return type:

type