Introducing Wagtail

Richard McMillan, 26 February 2015

During the last few months we have spent a good amount of time working with Wagtail, a really cool CMS built on top of the well-known Django framework. The fact we chose Wagtail to build some of our latest projects with has been everything but accidental.

What we were looking for

It all started with a relatively small project with tight budget and deployment dates. Some of the requirements the client was asking for at that time were:

  • User-friendly administration interface
  • Theme/skin easy to customise
  • Initial low-cost setup
  • Easy to extend

We were also looking to our own list of requirements. Some were very CMS-oriented:

  • Great search
  • Image library
  • Documents library
  • Responsive admin interface
  • Page preview feature
  • Schedule published content
  • Sensible users, groups and permissions
  • Simple and clean HTML editor. Block-based editor preferably

While other requirements were more technical:

  • Open source
  • Built on a robust, mature framework
  • Easy setup/deployment in virtual environments
  • Able to add new content types easily
  • Easy to implement new admin features
  • Clean and simple modules/apps system
  • Multi-language support
  • Great documentation
  • Active maintainers and active community
  • Great templating system

Why Wagtail?

Having plenty of in-house experience with other CMS frameworks made the choice quite difficult. There are plenty of good options out there and we tried a lot of them before jumping into Wagtail. We’re choosing to highlight why we chose Wagtail, rather than having a CMS shootout :)

Strong and active community, great documentation

As of today, the Wagtail project in Github has some impressive vital statistics:

  • 53 contributors
  • 15 releases since February 2014
  • 300+ forks
  • 2.3K stars
  • 173 open issues vs 358 closed

The project has a very active core of contributors who are in charge of the development. They seem to be very reactive on new issues and have a solid roadmap for the development of the CMS. Releases and upgrades are regular and the documentation is extensive, detailed and most important, useful.

If that wasn’t enough Wagtail is built on top of the Django framework, without any doubt one of the best web frameworks out there. We’re not going to go into details but if you’d like to know more about Django just dive into their great site and documentation.

Easy setup in our dev workflow

Getting started with Wagtail couldn’t be easier thanks to the demo app provided by the Wagtail guys. It’s a simple and basic blog app that comes with a Vagrant box, allowing you to see how easy it is to handle Wagtail and Python dependencies in a virtual machine.

We also love the integration with virtualenv, which we highly recommend for production environments. In case you’re into Docker, check this demo and see how nicely it plays with it.

On top of that you get all the powerful features of Django for things such as unit testing, interface testing, database migrations and so on. These tools make development easy, flexible and robust.

Great content editing experience for users

Wagtail ships with Hallo.js, a simple and elegant web editor. One of the things that matter most to us is to be able to provide our users and clients with beautiful, elegant and easy-to-use interfaces. The Wagtail rich text editor makes content editing fun again and gets rid of all inconveniences caused by old looking and outdated rich HTML web editors.

From a technical perspective we found it very easy to add/remove/edit features to the editor thanks to its plugin system. The Hallo.js project is open source and actively maintained in Github.

Wagtail editor for rich text fields

Killer search feature

Wagtail has two search backends: one database-based and the other is Elasticsearch. Elasticsearch is an awesome open source search engine and it’s without any doubt one of our favorite features of the whole CMS (features like typeahead come out of the box).

The integration with Elasticsearch is extremely easy and the results in terms of performance are great. Developers can enable the fields the search will be performed on and define the level of relevance per model/field. If that's not enough you can always manually promote search results using the Editor's Pick feature.

The administration interface ships with a useful set of front-end views that provide a quick and fluent AJAX feature for pages, images and documents.

Wagtail image search interface

Modular architecture

As a web agency we do a good amount of customisation and tailored development for our clients. Keeping this in mind we’re always aiming for tools and systems that are easy to extend but at the same time are robust and properly built from a software development perspective.

Wagtail perfectly aligns with this philosophy and divides its features and components in a clean and well-organized modular structure. Test coverage is currently at 94% and continuous integration with Travis CI ensures no line of code is added to the system without being tested first.

Developing and adding features to the CMS is as easy as building your own Django apps and plugging them in to Wagtail. Wagtail allows developers to override core files such as templates, stylesheets, JS files and so on, making things really easy when integrating your features into the administration interface. You can check out a couple of in-house modules we’ve published in Github:

Conclusions

Wagtail isn’t perfect, in the way that something not built by you is never quite perfect (even things you build yourself often aren’t either). But we like it because it ships with a bunch of critical features that provide us with a solid foundation to build our web applications on top of and we’re happy that it aligns with our own philosophy and user guidelines.

We’ll be publishing more articles about our Wagtail experiences so stay tuned!

If you'd like to have a chat about Wagtail, please get in touch.