Container

Models

A container component with a title, image, features, content and able to include children plugins.

class cmsplugin_blocks.models.container.Container(*args, **kwargs)[source]

Container component.

title

An optional title string.

template

Template choice from available plugin templates in setting BLOCKS_CONTAINER_TEMPLATES. Default to the first choice item.

image

Optional image file.

image_alt

An optional text string for alternative image text.

size_features

Optional related size features.

color_features

Optional related color features.

extra_features

Optional related extra features.

content

Required long text, it will be editable through CKeditor on plugin form.

Factories

Forms

class cmsplugin_blocks.forms.container.ContainerForm(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]

Container form used in plugin editor.

property media

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

Plugins

class cmsplugin_blocks.plugins.container.ContainerPlugin(model=None, admin_site=None)[source]
model

alias of Container

form

alias of ContainerForm

get_fieldsets(request, obj=None)[source]

Define plugin form fieldsets depending features are enabled or not (when there is no defined feature choices).