Skip to main content

unitegallery grid Plugin for django CMS

Project description

https://travis-ci.org/izimobil/djangocms-unitegallery.svg?branch=master https://img.shields.io/pypi/l/djangocms-unitegallery.svg https://img.shields.io/pypi/pyversions/djangocms-unitegallery.svg https://img.shields.io/badge/django-1.7%20or%20newer-green.svg https://img.shields.io/badge/djangocms-3%20or%20newer-green.svg https://img.shields.io/pypi/dm/djangocms-unitegallery.svg

A gallery plugin for django CMS that uses the excellent Unite Gallery jQuery plugin.

Installation

This plugin requires django CMS 3.0 or higher and sorl-thumbnail 12.0 or higher to work.

  • Run pip install djangocms-unitegallery

  • Add 'sorl.thumbnail' and 'djangocms_unitegallery' to your INSTALLED_APPS

  • Run python manage.py migrate

Configuration

By default djangocms-unitegallery generates thumbnails for better perfomance. The default behavior is to generate thumbnails by resizing and cropping images in a square of 250x250 px.

You can disable completely the thumbnail generation and leave Unite Gallery handles images and preview, or you can change the default size of generated thumbnails and/or wether the image ratio should be preserved or not:

DJANGOCMS_UNITEGALLERY_CONFIG = {
    'THUMBNAIL_ENABLED': true,
    'THUMBNAIL_MAX_WIDTH': 250,
    'THUMBNAIL_MAX_HEIGHT': 250,
    'THUMBNAIL_PRESERVE_RATIO': False,
}

If you set THUMBNAIL_PRESERVE_RATIO to False, thumbnails will be cropped to match the configured width and height. If you set THUMBNAIL_PRESERVE_RATIO to True, thumbnails will just be resized to match the configured max width (if image is landscape) or height (if image is portrait).

Project details


Download files

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

Source Distribution

djangocms-unitegallery-0.1.0.tar.gz (412.2 kB view hashes)

Uploaded Source

Built Distribution

djangocms_unitegallery-0.1.0-py2.py3-none-any.whl (457.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page