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:
CustomModelFormForm for creating and modifying POICategory objects
Form fields:
icon: Icon (TypedChoiceField)color: Color (TypedChoiceField)
- 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:
BaseInlineFormSetA 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)
- class integreat_cms.cms.forms.poi_categories.poi_category_translation_form.POICategoryTranslationForm(**kwargs: Any)[source]
Bases:
CustomModelFormForm for creating and modifying POI category translation objects
Form fields:
category: Category (ModelChoiceField)language: Language (ModelChoiceField)name: Category name (CharField)
- 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:
- property media[source]
Return all media required to render the widgets on this form.