Mixins (feincms3.mixins)

class feincms3.mixins.LanguageMixin(*args, **kwargs)[source]

Pages may come in varying languages. LanguageMixin helps with that.

activate_language(request)[source]

activate() the page’s language and set request.LANGUAGE_CODE

class feincms3.mixins.MenuMixin(*args, **kwargs)[source]

The MenuMixin is most useful on pages where there are menus with differing content on a single page, for example the main navigation and a meta navigation (containing contact, imprint etc.)

static fill_menu_choices(sender, **kwargs)[source]

Fills in the choices for menu from the MENUS class variable. This method is a receiver of Django’s class_prepared signal.

class feincms3.mixins.RedirectMixin(*args, **kwargs)[source]

The RedirectMixin allows adding redirects in the page tree.

clean_fields(exclude=None)[source]

Ensure that redirects are configured properly.

class feincms3.mixins.TemplateMixin(*args, **kwargs)[source]

It is sometimes useful to have different templates for CMS models such as pages, articles or anything comparable. The TemplateMixin provides a ready-made solution for selecting django-content-editor Template instances through Django’s administration interface.

static fill_template_key_choices(sender, **kwargs)[source]

Fills in the choices for menu from the MENUS class variable. This method is a receiver of Django’s class_prepared signal.

regions

Return the selected template instances’ regions attribute, falling back to an empty list if no template instance could be found.

template

Return the selected template instance if the template_key field matches, or None.