A simple gallery app for Wagtail.
Project description
# Wagtail Simple Gallery
Is an extension for Torchbox's [Wagtail CMS](https://github.com/torchbox/wagtail) for creating a simple image gallery either by creating a page using the template or templatetag.
Current version should work with Wagtail version >= 1.5.3 and Python 2.7, 3.4 and 3.5.
## Getting started
### Install
- Install via pip `pip install wagtail-simple-gallery`.
- Add `wagtail_simple_gallery` to `INSTALLED_APPS` in your project settings.
- Run `python manage.py migrate wagtail_simple_gallery`.
### Use
- Create a new collection in Wagtail CMS: **Settings -> Collections**.
- Add or upload images to the collection.
- Create a new page using the **Simple Gallery Index** template and select the new collection.
- You are done, preview or publish the page and you should see the gallery in action.
## Features / Options
- Toggleable [Lightbox](https://feimosi.github.io/baguetteBox.js/) for viewing images.
- Show images from selected collection.
- The amount of images shown on one page (before the paginator kicks in) is changeable.
## Templatetags
### `{% simple_gallery %}` inclusion tag
Uses the template **wagtail_simple_gallery/simple_gallery.html**.
- `collection` (default: None): Show images from this collection. **Required**, example: `{% simple_gallery collection="Root" %}`.
- `tags` (default: None): Filter images by their tags. Example: `{% simple_gallery tags="cats dogs" %}`.
- `image_limit` (default: None): Limit the amount of images to show. Example: `{% simple_gallery image_limit=4 %}`.
- `use_lightbox` (default: True): Use lightbox for viewing images. Example: `{% simple_gallery use_lightbox=False %}`.
### `{% img|original_url %}` filter
- Takes wagtails Image object and returns its real original url, not the one that wagtail creates. Example: `/media/original_images/foo.jpg`.
## Template
Look at **simple_gallery_index.html** template for an example or copy paste it and start modifying to make it look a part of your page. Your custom **simple_gallery_index.html** template should reside in **/templates/wagtail_simple_gallery/simple_gallery_index.html**
Or if **simple_gallery_index.html** is good enough for your use, then you can just create a **simple_gallery_base.html** in your own templates directory with the following content:
```
{% extends "base.html" %}
{% block content %}{% endblock %}
```
Is an extension for Torchbox's [Wagtail CMS](https://github.com/torchbox/wagtail) for creating a simple image gallery either by creating a page using the template or templatetag.
Current version should work with Wagtail version >= 1.5.3 and Python 2.7, 3.4 and 3.5.
## Getting started
### Install
- Install via pip `pip install wagtail-simple-gallery`.
- Add `wagtail_simple_gallery` to `INSTALLED_APPS` in your project settings.
- Run `python manage.py migrate wagtail_simple_gallery`.
### Use
- Create a new collection in Wagtail CMS: **Settings -> Collections**.
- Add or upload images to the collection.
- Create a new page using the **Simple Gallery Index** template and select the new collection.
- You are done, preview or publish the page and you should see the gallery in action.
## Features / Options
- Toggleable [Lightbox](https://feimosi.github.io/baguetteBox.js/) for viewing images.
- Show images from selected collection.
- The amount of images shown on one page (before the paginator kicks in) is changeable.
## Templatetags
### `{% simple_gallery %}` inclusion tag
Uses the template **wagtail_simple_gallery/simple_gallery.html**.
- `collection` (default: None): Show images from this collection. **Required**, example: `{% simple_gallery collection="Root" %}`.
- `tags` (default: None): Filter images by their tags. Example: `{% simple_gallery tags="cats dogs" %}`.
- `image_limit` (default: None): Limit the amount of images to show. Example: `{% simple_gallery image_limit=4 %}`.
- `use_lightbox` (default: True): Use lightbox for viewing images. Example: `{% simple_gallery use_lightbox=False %}`.
### `{% img|original_url %}` filter
- Takes wagtails Image object and returns its real original url, not the one that wagtail creates. Example: `/media/original_images/foo.jpg`.
## Template
Look at **simple_gallery_index.html** template for an example or copy paste it and start modifying to make it look a part of your page. Your custom **simple_gallery_index.html** template should reside in **/templates/wagtail_simple_gallery/simple_gallery_index.html**
Or if **simple_gallery_index.html** is good enough for your use, then you can just create a **simple_gallery_base.html** in your own templates directory with the following content:
```
{% extends "base.html" %}
{% block content %}{% endblock %}
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wagtail-simple-gallery-0.2.tar.gz
(11.9 kB
view hashes)
Close
Hashes for wagtail-simple-gallery-0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3d3f7d26a2bad377fea7bcbcaa8fae6e237a2bdffbb78d0fe9979d56b9010a2 |
|
MD5 | 3ce55b2f4f6734160296b8af8aa57bae |
|
BLAKE2b-256 | c3f92eb4cedce488fe0416fd96da2cd567ad5338aeb1f7a12fd89e5202e7792e |