Skip to main content

Gridder layout for the Django CMS Wagtail.

Project description

Wagtail Gridder

Wagtail Gridder is a Bootstrap 4 enabled layout for the Wagtail CMS. Grid Items are created within categories, and displayed on a Grid Index Page. The JavaScript libraries Gridder and MixItUp are included.

Requirements

  • Django >= 1.9
  • Wagtail >= 1.9 (for ParentalManyToMany)
  • Bootstrap >= 3 (optimized for Bootstrap 4; templates can be modified)

These installation instructions assume you are using Wagtail 2.0 or greater.

Installation

This installation assumes that you already have Django and Wagtail installed as part of your project.

Wagtail Gridder can then be installed like most Django apps. First, install it into your virtualenv:

pip install wagtailgridder

Then add wagtailgridder to your list of INSTALLED_APPS in your Django settings file. You will also need to add wagtail.contrib.modeladmin, if you haven't already. Your final settings may look something like this:

WAGTAIL_APPS = [
    'taggit',
    'modelcluster',
    'wagtail.core',
    'wagtail.admin',
    'wagtail.documents',
    'wagtail.snippets',
    'wagtail.users',
    'wagtail.images',
    'wagtail.embeds',
    'wagtail.search',
    'wagtail.sites',
]

WAGTAIL_CONTRIB_APPS = [
    'wagtailgridder',
    'wagtail.contrib.modeladmin',
]

INSTALLED_APPS = INSTALLED_APPS + WAGTAIL_APPS + WAGTAIL_CONTRIB_APPS

This Wagtail Gridder template extends base.html, with the hope that this allows inclusion or your site's top and bottom navigation without much effort. There is an example base.html provided.

Then log into the Wagtail admin, and you should see a "Grid Layouts" section of the menu. The first thing you will want to do is add some "Grid Categories." After that, you can create "Grid Items" (the cards, pictured below) and put them together on a "Grid Index Page."

Settings

WAGTAILGRIDDER_CLEAR_CACHE = False

The default Wagtail Gridder template caches the grid display area to reduce the number of queries performed. Setting WAGTAILGRIDDER_CLEAR_CACHE = True in your Django settings will clear the entire Django cache after a page is edited. This approach is necessary, as Django does not currently support deletion from the cache by pattern. Setting this to True will clear your cache every time you save a Wagtail page. If anyone knows of a better solution that works for Django's supported cache systems, please let us know!

Screenshots

Grid Index Page:

Grid Index Page

Grid Index Page, with Grid Item expanded:

Grid Index Page, with Grid Item expanded

Optional featured hero region:

Optional featured hero region

Grid Item landing page:

Grid Item landing page

Editing a Grid Item:

Editing a Grid Item

Editing a Grid Index Page:

Editing a Grid Index Page

Release Notes

0.9.19

  • Wagtail 2.0 compatibility.
  • Bugfix: a bad relation in search_fields of GridIndexPage caused problems for Elastic Search.

Contributors

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

wagtailgridder-0.9.30.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

wagtailgridder-0.9.30-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file wagtailgridder-0.9.30.tar.gz.

File metadata

File hashes

Hashes for wagtailgridder-0.9.30.tar.gz
Algorithm Hash digest
SHA256 ea6243a197b3ffda5f2ff67a517eb1d4b586b8a2500b1e6e860227e39b11be55
MD5 4757d9c1c6c23c7dcb0d65dc603241d8
BLAKE2b-256 b6da28f75ed4e5cc002c727d2598264068432b1735db16ff06208ead0666e18a

See more details on using hashes here.

File details

Details for the file wagtailgridder-0.9.30-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtailgridder-0.9.30-py3-none-any.whl
Algorithm Hash digest
SHA256 327acd3cce5fb53a310b055bbb13fcfd51e2c4d2d5f86deb7f1506a7d47efe71
MD5 9832a749f2b89d860945c5cc13a992ec
BLAKE2b-256 81d2e741eec98c45e1874dd4b348e8e9324a6942663f3b0f289306894d848ee3

See more details on using hashes here.

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