Album¶
An album component you may use in a gallery.
Album items are ordered from their order
field value. Items with a zero
value for their order will be ordered in an almost arbitrary order (mostly
depending from item object id).
Album form have a special field mass_upload
, it expects a valid ZIP archive
file to create items. Archive file is limited to the value from setting
BLOCKS_MASSUPLOAD_FILESIZE_LIMIT
.
The archive file may contains one or many image files with enabled format from
setting BLOCKS_ALLOWED_IMAGE_EXTENSIONS
. Each image will create a new Album
item where the name will be filled with the full relative image file path. Images
in archive can be structured in multiple subdirectory. Created Album item from
an archive don’t have any order.
-
class
cmsplugin_blocks.models.album.
Album
(*args, **kwargs)[source]¶ Album container for items.
-
title
¶ A required title string.
-
template
¶ Template choice from available plugin templates in setting
BLOCKS_ALBUM_TEMPLATES
. Default to the first choice item.
-
features
¶ Optional string of CSS class names divided by a single comma.
-
-
class
cmsplugin_blocks.models.album.
AlbumItem
(*args, **kwargs)[source]¶ Album item to include in container.
-
title
¶ Optional title string.
-
order
¶ Number for order position in item list.
-
features
¶ Optional string of CSS class names divided by a single comma.
-
image
¶ Required image file, limited to enabled image formats from settings
BLOCKS_ALLOWED_IMAGE_EXTENSIONS
.
-