Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 3.07 KB

README.md

File metadata and controls

48 lines (34 loc) · 3.07 KB

Wagtail CMS

This directory contains best practices for working with Wagtail, DataMade's preferred content management system.

Contents

When to use Wagtail

A content management system such as Wagtail allows users of a site to add, edit, and delete certain content through a friendly interface separate from the project's code. Wagtail should be used for projects where a client would like the ability to modify content directly without DataMade as an intermediary.

How to use Wagtail

When at all possible, Wagtail setup should happen at the beginning of a project concurrent with Django setup. Development with a CMS in mind is easier and faster than retrofitting a project with a CMS.

Instead of initializing a Django project with django-admin startproject, a Wagtail project should be initialized with:

wagtail start <YOUR PROJECT NAME>

See more on getting started with Wagtail here.

Supporting editors

A CMS is only as powerful as it helps its editors to be. Wagtail offers an editor's guide here, which can be shared directly with clients.

For any site where people outside DataMade will be using Wagtail, consider creating a non-technical version of the site documentation. For examples that can be used as templates, see:

  1. LISC CDNA
  2. Lugar Center Oversight Hearing Index

Resources for learning

  • Before beginning a first Wagtail implementation, all developers should read The Zen of Wagtail to familiarize themselves with the guiding concepts.
  • After that, the official Wagtail documentation is a good place to start.

Wagtail Cache

We recommend the wagtail-cache library for invalidating the cache whenever a user edits a Wagtail page model. It's simple and lightweight. Follow the docs to get it setup.

Note that wagtail-cache won't invalidate any changes to a custom, non-Wagtail model that is managed in the Wagtail admin dashboard. In that case you'll still need to use the built-in Django caching.

More info about this adoption: