Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

A set of DjangoCMS plugins to make content with less involved HTML than directly using CKeditor for everything.

Project Description

A set of DjangoCMS plugins to make content with less involved HTML than directly using CKeditor for everything.

This just supply some plugins with a default basic template. There is no CSS, Javascript or anything else like frontend integration.

Requires

Install

First install package

pip install cmsplugin-blocks

Add it to your installed Django apps in settings like this :

INSTALLED_APPS = (
    ...
    'cms',
    'djangocms_text_ckeditor',
    'sorl.thumbnail',
    'cmsplugin_blocks',
)

Then load its settings from your settings file:

from cmsplugin_blocks import *

And finally apply database migrations.

Available components

Album

Available fields:

  • title;
  • brief;
  • template;

Album have related items AlbumItem which are added/edited through inline form.

Available AlbumItem items fields:

  • image;
  • content;

Card

Available fields:

  • alignment;
  • template;
  • image;
  • content;

Hero

Available fields:

  • template;
  • image;
  • content;

Slider

Available fields:

  • title;
  • template;

Available SlideItem items fields:

  • image;
  • content;
  • link_name;
  • link_url;
  • link_open_blank;

Slider have related items SlideItem which are added/edited through inline form.

Mass upload

There is a field “mass upload” on Album that attemp a valid ZIP archive file to create new album items. Each image file from ZIP archive will be added as a new album item using image filename as item title. Scanning ZIP archive for image files is recursive and so the full image filename is used, even its relative path inside archive.

Settings

These are default settings you may override in your own project settings.

BLOCKS_ALBUM_TEMPLATES
Available templates to render an Album object and its items. Default setting value contains only one default template.
BLOCKS_CARD_TEMPLATES
Available templates to render an Card object. Default setting value contains only one default template.
BLOCKS_HERO_TEMPLATES
Available templates to render an Hero object. Default setting value contains only one default template.
BLOCKS_SLIDER_TEMPLATES
Available templates to render an Slider object and its items. Default setting value contains only one default template.
BLOCKS_TEMP_DIR
Path to directory where to store temporary ZIP archive for mass upload. Default to temp/.
BLOCKS_MASSUPLOAD_IMAGE_TYPES
Allowed images file extensions in ZIP archive for mass upload. Default value allow jpg, jpeg, svg, gif and png.
BLOCKS_MASSUPLOAD_FILESIZE_LIMIT
Maximum file size (in bytes) allowed for ZIP archive for mass upload. Default to 429916160 (50MiO).

Release history Release notifications

This version
History Node

0.5.0

History Node

0.4.0

History Node

0.3.0

History Node

0.2.0

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
cmsplugin-blocks-0.5.0.tar.gz (17.4 kB) Copy SHA256 hash SHA256 Source None Mar 9, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page