Wagtail CMS

Robert Crowther Jan 2022
Last Modified: Feb 2023

What is it?

A Content Management System (but see comments in Wierd Facts). That is, a heap of helper code used to deliver web pages.

What it’s made from

Python

Where it can run

Any computer with Python. Hosting needs hosts with Python, which do exist, though there are less of these than for, say, PHP. Or a VPS.

Who looks after it?

Open source, A company called Torchbox created it.

History

Rumours are the developers were tiring of Drupal wandering between sense and insanity. First versions arrived in about 2014.

Licence

Like Python, MIT. This means Wagtail is Open‐Source compatible, but without the fighting talk of a full GPL licence.

Install

Uses recent Python, usually with a Python ‘virtualenv’ to lock dependancies to versions. The Python package installer ‘pip’ is used to install most additional code. Python is a fly‐compile language, and has established installs on many platforms,

Wagtail installation is set up to automate from files. It has Django’s killer feature, an SQLite database builtin. It creates a skeleton (almost) automatically.

Some bits of Wagtail installation can seem like watching the inside of a watch run. But overall, for web code, Wagtail is a shockingly fast and painless install. Which feels like it would work on most systems.

Internal structure

Underneath, Wagtail uses the Django codebase. But Wagtail makes substantial additions. A short list,

The tree structure is worth noting. In Wagtail you add a new page by adding it as a child to other pages. Simple. That said, I think Django CMS does this too.

Here we should mention a curious ’feature’ of Wagtail. When people think of a CMS, they usually mean code with a GUI interface to modify and maintain a database. But Wagtail requires a user to code—you need to define pages, and do some configuration. For more on this, see ‘Off‐hand facts’ below.

The Wagtail site makes it very clear why and where the development team do this—they think some things are better done in code.

Getting started

Wagtail is built on Django, which has an unusually abstracted and tidy file/directory layout. Wagtail adds some sensible changes, such as a new layout of settings. Much of the code is available from boot.

All in all, Wagtail is a groovy startup, convincing in solidity, and encouraging in features. It glides you through much of the ugliness of Django. Perhaps the only downside is that, if you were expecting WordPress, there is coding to do.

In use

At base Wagtail is Django. You will need to write code for models and the like. Wagtail’s Page class is inherited into all models, to provide some of the core Wagtail functionalities. It’s a more trouble and learning than other CMS. But it it more flexible than them. Also, the trouble does not run deep—you will not find you need to learn more to complete projects.

Extending

At base, it’s Django. Getting into development is a long haul.

Libraries

Wagtail has a few plugins available. Django packages that do not interfere with Wagtail areas will work. It’s hard to say what will and will not work—deployment utilities will, because Wagtail has nothing to say about that, but anything to do with models will not.

I must say, no CMS has ever impressed me so much as Wagtail for biting the bullet. The developers have tackled all the major areas of text management, providing revision control, forms, search integration, and image uploads, Even the concious decision to back out of model definitions by using code, is at least a concious decision. Off the cuff, there is less to add and more of what I would like than any other CMS I have used.

Deployment

It’s Python/Django. So you will not be using the friendly shared host that your mate likes and recommends. But Django, so Wagtail, does have a wide range of options, more than most other web code.

Documentation

Documentation is to Python standards. Coverage is mostly complete and the writing consistent.

There are two complaints. The first is that Python documentation—not Wagtail’s fault—wanders and is impossible to reference. The second is that is it nat clear which areas need Wagtail documentation, and which need Django documentation. Flitting between the two is frustrating.

MIA

Wagtail has no provision for making menus. There are a couple of plugin apps that cover this, making menus by wiring in various kind sof configuration. The most well‐known seems to be wagtail‐menus]wagtail menus.

Practically, to use Wagtail, you need to be creating pages of text. Try use it for ecommerce or launching web apps, and you encounter a nest of Wagtail rigging. Sure there’s probably a configuration option for anything somewhere, but you’d probably be better off making separate sites.

And Wagtail is not going to run big‐scale document delivery. It will not run a library website. Though Wagtail’s front‐end would drag the others into this century.

Examples of use

Like Django, non‐commercial websites for premium quality organisations. Wagtail’s big scoop was the English National Health Service. That’s an example of a site that is a natural fit (a lot of documents, fine‐grained control, search needed)

Off‐hand facts

There’s an argument that Wagtail should not be called a CMS. It fills the role by description, Content Management System. But an expectation of Content Management systems is that they provide a user interface out of the box—like a library database system would, or most other web CMS provide (after an install). Fundamentally, Wagtail requires builders to write code, to create models.

Personal opinion, I would probably agree, Wagtail is not a CMS or, at last, does not meet the usual expectation of a CMS. But I feel rhis is unfair on Wagtail. Wagtail delivers the other usual expectation of a CMS—it can save, display or organise text (especially) information in a consistent, abstracted way. In that sense, Wagtail is far beyond the usual idea of a ‘Web Framework’. Wagtail probably needs and deserves a new category, something like ‘Documentation Framework’.

Weird API

In honesty, this is a killer feature. Streamfields. I havn’t mentioned them.

What is wrong with Rich Text input? A lot, as it happens. It requires those wild form inputs that resemble word‐processors. And the conversion from WYSIWYG to internal markup is beyond most users, and inconclusive for the code, which insults both parties. You only need to listen to a few users talking about how they want to ‘Put an image in the centre’, or ‘indent all the text’, to realise how Rich Text‐>Markup fails both the user and the computer.

Wagtail’s Streamfield solves this by providing a form that expands using Javascript to provide simple inputs and options in a freeform way. You want to put in a blockquote? Use the blockquote form. An image? Use the image form. This is better for the user, they either see the feature or not. It is better for the computer, because the input is defined for sure (this data is defined as a blockquote, this other data is defined as an address, not some improvised indenting). The result is written as JSON, not XML. Which is easy to parse and maintain.

The only downside is the coding for the flexible forms is ferocious. Other than that, Streamfields should supersede every RichText field in the universe.

Wierd behaviour

None that I have encountered. Like Django, Wagtail is solid, if irritating and involved.

Performance

Python is slow. Wagtail is ok for Django. You are not going to recode this to deliver EBay. But speed likely depends more on database and deployment work than the code itself.

Summary

Pros,

Cons,

Conclusion

Wagtail is special. With it’s half‐coded outlook and Python base it will never be a big player. But it has convincing solidity, and Django security behind it.

You could say that about any other Django CMS, but Wagtail has extra interest. The developers have kicked into areas other CMS do not try. Wagtail has underrated, and somewhat unheralded (even by the home site), features like revision control and Streamfields. This is when other CMS have struggled for years to provide image uploads. People call Wagtail a simple CMS, but it has as much code as any, but is better designed.

If there is a downside… it needs code, which probably rules out a swathe of developers. And it will not do anything other than what it says it will do, which is manage page content. But if that’s what you want, this CMS doesn’t have promotions for you, it has answers.

References

Main site,

https://wagtail.io/