Language Tree

Forms for creating and modifying language tree objects

Language Tree Node Form

class integreat_cms.cms.forms.language_tree.language_tree_node_form.LanguageTreeNodeForm(**kwargs: Any)[source]

Bases: CustomModelForm, CustomTreeNodeForm

Form for creating and modifying language tree node objects

Form fields:

Parameters:

kwargs (Any)

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

Initialize language tree node form

Parameters:

**kwargs (Any) – The supplied keyword arguments

Return type:

None

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

Validate form fields which depend on each other, see django.forms.Form.clean(): Don’t allow multiple root nodes for one region: If self is a root node and the region already has a default language, raise a ValidationError.

Returns:

The cleaned form data

Return type:

dict[str, Any]

property media[source]

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

save(commit: bool = True) LanguageTreeNode[source]

This method extends the default save()-method of the base ModelForm to flush the cache after committing.

Parameters:

commit (bool) – Whether or not the changes should be written to the database

Returns:

The saved page translation object

Return type:

LanguageTreeNode