Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Add an image gallery to your Kotti site

Project Description

This is an extension to the Kotti CMS that allows you to add galleries with images to your Kotti site.

It uses Bootstrap Carousel for the gallery view.

Find out more about Kotti

Compatibility

As of Kotti 0.7 the image type from kotti_image_gallery has been moved to the Kotti core. Please use the kotti_gallery package, which supersedes this package with Kotti versions >= 0.7.

Setup

To activate the kotti_image_gallery add-on in your Kotti site, you need to add an entry to the kotti.configurators setting in your Paste Deploy config. If you don’t have a kotti.configurators option, add one. The line in your [app:main] section could then look like this:

kotti.configurators = kotti_image_gallery.kotti_configure

With this, you’ll be able to add gallery and image items in your site.

Image URLs

kotti_image_gallery provides on-the-fly image scaling by utilizing plone.scale (thanks to Tom Lazar for the hint).

Images (including arbitrary scales) can be referenced by this URL schema: /path/to/image_content_object/image[[/<image_scale>]/download] where <image_scale> can be:

  • a predefined image scale (see below)
  • a string of the form <max_width>x<max_height> or
  • a URL path segment of the form <max_width>/<max_height>

If the last URL path segment is download, the image will be served with Content-disposition: attachment otherwise it will be served with Content-disposition: inline.

Predefined image scale sizes

You may define image scale sizes in your .ini file by setting values for kotti_image_gallery.scale_<scale_name> to values of the form <max_width>x<max_height> (e.g. kotti_image_gallery.scale_thumb = 160x120 with the resulting scale name thumb).

thumb (160x120) and carousel (560x420) are always defined (because they are used in the default templates), but their values can be overwritten by setting kotti_image_gallery.scale_thumb and/or kotti_image_gallery.scale_carousel to different values in your .ini file.

Work in progress

kotti_image_gallery is considered alpha software, not suitable for use in production environments. The current state of the project is in no way feature complete nor API stable. If you really want to use it in your project(s), make sure to pin the exact version in your requirements. Not doing so will likely break your project when future releases become available.

Development

Contributions to kotti_image_gallery are highly welcome. Just clone its Github repository and submit your contributions as pull requests.

Note that all development is done on the develop branch and master is reserved for “production-ready state”. Therefore make sure to always base your work on the current state of the develop branch.

This follows the highly recommended A successful Git branching model pattern, which is implemented by the excellent gitflow git extension.

Testing

kotti_image_gallery has 100% test coverage. Please make sure that you add tests for new features and that all tests pass before submitting pull requests. Running the test suite is as easy as running py.test from the source directory.

TODO

  • cleanup HTML/CSS
  • add support for remote galleries (e.g. flickr photosets)
  • add tests

CHANGES

0.3.1

  • fix packaging (thanks to Marco Scheidhuber for reporting)

0.3

  • don’t duplicate code/functionality that already exists in Kotti
  • 100% test coverage

0.2

  • Image inherits from File now.
  • Replaced repoze.bitblt based image scaling with much more powerful plone.scale based version.

0.1

  • Initial release.
Release History

Release History

This version
History Node

0.3.2

History Node

0.3.1

History Node

0.3

History Node

0.3dev

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
kotti_image_gallery-0.3.2.tar.gz (6.8 kB) Copy SHA256 Checksum SHA256 Source May 4, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting