All Projects → Temeez → wagtail-simple-gallery

Temeez / wagtail-simple-gallery

Licence: MIT license
A simple gallery app for Wagtail. https://pypi.org/project/wagtail-simple-gallery/

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to wagtail-simple-gallery

Django Salesman
Headless e-commerce framework for Django.
Stars: ✭ 157 (+282.93%)
Mutual labels:  wagtail
wagtailenforcer
The Wagtail arm of the law - enforce security protocols on your Wagtail site
Stars: ✭ 43 (+4.88%)
Mutual labels:  wagtail
wagtail-filepreviews
Extend Wagtail's Documents with image previews and metadata from FilePreviews
Stars: ✭ 21 (-48.78%)
Mutual labels:  wagtail
Wagalytics
A Google Analytics dashboard in your Wagtail admin
Stars: ✭ 176 (+329.27%)
Mutual labels:  wagtail
wagtail-headless-preview
Previews for headless Wagtail setups
Stars: ✭ 99 (+141.46%)
Mutual labels:  wagtail
wagtail-redirect-importer
Note: This library is now included in Wagtail 2.10, use the builtin version instead of this.
Stars: ✭ 15 (-63.41%)
Mutual labels:  wagtail
Wagtail
A Django content management system focused on flexibility and user experience
Stars: ✭ 11,387 (+27673.17%)
Mutual labels:  wagtail
wagtail-react-project
Wagtail template with a React/Redux frontend.
Stars: ✭ 25 (-39.02%)
Mutual labels:  wagtail
digihel
City of Helsinki Digital Helsinki Wagtail CMS
Stars: ✭ 19 (-53.66%)
Mutual labels:  wagtail
wagtail-sharing
Easier sharing of Wagtail drafts
Stars: ✭ 46 (+12.2%)
Mutual labels:  wagtail
wagtailcommonblocks
Common StreamField blocks for Wagtail
Stars: ✭ 40 (-2.44%)
Mutual labels:  wagtail
freeturn
Freelance mission control
Stars: ✭ 50 (+21.95%)
Mutual labels:  wagtail
wagtaildraftail
🐦📝🍸 Draft.js editor for Wagtail, built upon Draftail and draftjs_exporter
Stars: ✭ 23 (-43.9%)
Mutual labels:  wagtail
Consumerfinance.gov
Django project protecting American consumers
Stars: ✭ 164 (+300%)
Mutual labels:  wagtail
wagtailmodelchoosers
A Wagtail app to pick generic models (rather than snippets or pages)
Stars: ✭ 23 (-43.9%)
Mutual labels:  wagtail
Wagtailmedia
A Wagtail module for managing video and audio files within the admin
Stars: ✭ 128 (+212.2%)
Mutual labels:  wagtail
vagrant-wagtail-develop
A script to painlessly set up a Vagrant environment for development of Wagtail
Stars: ✭ 36 (-12.2%)
Mutual labels:  wagtail
gatsby-source-wagtail
Plugin for sourcing Gatsby data from Wagtail CMS
Stars: ✭ 16 (-60.98%)
Mutual labels:  wagtail
wagtail-import-export
UNMAINTAINED. Try wagtail-transfer, the evolution of this package: https://github.com/wagtail/wagtail-transfer/
Stars: ✭ 31 (-24.39%)
Mutual labels:  wagtail
WF-website
Website for Western Friend, part of the Religious Society of Friends
Stars: ✭ 34 (-17.07%)
Mutual labels:  wagtail

Wagtail Simple Gallery

Is an extension for Torchbox's Wagtail CMS for creating a simple image gallery either by creating a page using the template or a templatetag.

Current version works with Wagtail 2.8.x - 2.16.x & Django 2.2.x - 3.2.x.

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 Gallery index type 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 for viewing images.
  • Show images from selected collection.
  • The amount of images shown on one page (before the paginator kicks in) is changeable.
  • A crude way to order the images shown on a gallery page. By default newest images are shown first, but this can be changed in the page content settings. If it's set to "Image title" then you can manually order images by inserting [<number>] into their title: "[00004] Cute cat".
  • Tags.

Settings

SIMPLE_GALLERY_TEMPLATE

You can override the SimpleGalleryIndex page template with this setting. Default: wagtail_simple_gallery/simple_gallery_index.html

SIMPLE_GALLERY_ADMIN_URL_ROOT

You can use this with the Admin Interface if you use something other than "admin" for accessing the cms admin panel. Default: admin

SIMPLE_GALLERY_PAGE_TYPE

The page type presented to a Wagtail CMS user can be adjusted with this setting. Default: Gallery index.

Templatetags

{% load wagtailsimplegallery_tags %}

{% simple_gallery %} inclusion tag

Uses the template wagtail_simple_gallery/simple_gallery.html. You can use the simple-gallery style with this tag using: <link rel="stylesheet" href="{% static 'css/simple-gallery.css' %}">.

  • 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 instead of the one that wagtail creates. Example: /media/original_images/foo.jpg.

{% img.alt|hide_num_order %} filter

  • Hides the first occurance of [<number>] in the image title. E.g "[0010] Cute cat" -> "Cute cat"

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 %}

Admin Interface

It is suggested to take advantage of the existing Wagtail setting:

WAGTAILIMAGES_INDEX_PAGE_SIZE = 32

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].