Settings¶
These are the default settings you can override in your project settings.
- cmsplugin_blocks.defaults.BLOCKS_ENABLED_PLUGINS = ['AccordionPlugin', 'AlbumPlugin', 'CardPlugin', 'ContainerPlugin', 'HeroPlugin', 'SliderPlugin']¶
Enabled plugins to register. Unregistered plugin models are still created but not available anymore in DjangoCMS. This should be safe to edit to enable or disable plugins even with existing data, however existing plugin in pages will still be present.
- cmsplugin_blocks.defaults.BLOCKS_KNOWED_FEATURES_PLUGINS = ['Accordion', 'Album', 'Card', 'Container', 'Hero', 'Slider']¶
List of knowed plugin names where to enable features.
Developers should be aware when naming keys since we use a basic
containslookup expression on comma separated string, key names must be unique and can not be matched with a part of another key. LikeSlidercould matchSliderorSliderItem, so in this case we would prefer to use names likesSliderandSlideItem.Warning
You should not change this setting since they are used internally. Developpers that would want to implement features on their own plugins may add them here but carefully.
If you just want to removed some allowed cmsplugin-blocks plugins from features, see
BLOCKS_FEATURE_PLUGINS.
- cmsplugin_blocks.defaults.BLOCKS_FEATURE_PLUGINS = [('Accordion', 'Accordion'), ('Album', 'Album'), ('Card', 'Card'), ('Container', 'Container'), ('Hero', 'Hero'), ('Slider', 'Slider')]¶
Available plugins to allow on Features.
- cmsplugin_blocks.defaults.BLOCKS_ACCORDION_TEMPLATES = [('cmsplugin_blocks/accordion/default.html', 'Default')]¶
Available template choices to render a Accordion object and its items.
- cmsplugin_blocks.defaults.BLOCKS_ALBUM_TEMPLATES = [('cmsplugin_blocks/album/default.html', 'Default')]¶
Available template choices to render an Album object and its items.
- cmsplugin_blocks.defaults.BLOCKS_CARD_TEMPLATES = [('cmsplugin_blocks/card/default.html', 'Default')]¶
Available template choices to render an Card object.
- cmsplugin_blocks.defaults.BLOCKS_CONTAINER_TEMPLATES = [('cmsplugin_blocks/container/default.html', 'Default')]¶
Available template choices to render an Container object.
- cmsplugin_blocks.defaults.BLOCKS_HERO_TEMPLATES = [('cmsplugin_blocks/hero/default.html', 'Default')]¶
Available template choices to render an Hero object.
- cmsplugin_blocks.defaults.BLOCKS_SLIDER_TEMPLATES = [('cmsplugin_blocks/slider/default.html', 'Default')]¶
Available template choices to render a Slider object and its items.
- cmsplugin_blocks.defaults.BLOCKS_MODEL_TRUNCATION_LENGTH = 4¶
Word length limit for model string representation truncation.
This is used in every model string which are displayed in their plugin resume in DjangoCMS placeholder menu.
With a length of 4 words, an object title “Foo bar Lorem ipsum ping” will be cutted to “Foo bar Lorem ipsum”.
- cmsplugin_blocks.defaults.BLOCKS_MODEL_TRUNCATION_CHR = '...'¶
Truncation string added to the end of an object title when it have been truncated when over the word limit.
Use an empty string if you don’t want any character at the end of truncation.
- cmsplugin_blocks.defaults.BLOCKS_MASSUPLOAD_FILESIZE_LIMIT = 42991616¶
Maximum file size (in bytes) allowed for ZIP archive from mass upload feature.
This is a limit at Django level so files are still stored until post validation.
You should mind to configure a limit on your webserver to avoid basic attacks with very big files.
Value could be something like:
5242880for ~5MiO;10485760for ~10MiO;42991616for ~50MiO.
See:
https://stackoverflow.com/questions/2472422/django-file-upload-size-limit
Note
Instead, if your project use
django-configuration,
your settings class can inherits from
from cmsplugin_blocks.contrib.django_configuration import CmsBlocksDefaultSettings
and the settings class from SmartMedia see
SmartMedia configuration documentation.
About CKEditor settings¶
djangocms-text-ckeditor get configurations from
CKEDITOR_SETTINGS["toolbar_HTMLField"] when used from external plugin but
use CKEDITOR_SETTINGS["toolbar_CMS"] for internal plugin like its basic
TextPlugin.
You will have to copy toolbar_CMS config to toolbar_HTMLField if
you want to share the same configuration for every plugins:
CKEDITOR_SETTINGS["toolbar_HTMLField"] = CKEDITOR_SETTINGS["toolbar_CMS"]