16 Jun 2016

Wagtail 1.5: ModelAdmin, TableBlock, swappable rich text editors

1.5 brings the most popular third party app into core

Tom Dyson

Tom Dyson

Director, Torchbox

Hello ModelAdmin

modeladmin screenshot

We designed Wagtail as a content management system that could optionally reference your existing models, but we've become increasingly aware that for many users, existing Django models are the primary content. In response, Andy Babic (from UK agency Rock Kitchen Harris) developed wagtailmodeladmin, a powerful app which brings Django admin-style functionality into Wagtail's UI. After three months of answering support requests with 'just install wagtailmodeladmin' we asked Andy to help us move the app into Wagtail itself. After a one day sprint at Torchbox, a sleeker, faster, tested-er WMA became part of Wagtail, just in time for 1.5.

Note that modeladmin works equally well for Wagtail pages, images and documents, which are also 'just' Django models. If your site has 100,000 news articles, ModelAdmin can help you filter them by author and publication date. If you have an enormous image library, your editors might like a view of photos grouped by category or size or photographer. 

See the docs for a full list of ModelAdmin's features. If you've been using the third party app, see the README for upgrade instructions. Many thanks to Andy for his contribution and RKH for their generous support.

TableBlock

TableBlock

Since we launched StreamField in version 1.0, many users have created and shared new block types. TableBlock is an impressive implementation of a block type for editing table-based content, built by Moritz Pfeiffer with help from David Seddon and Brad Busenius. If you're interested in how features like this get developed, the history of Moritz's PR is a great example of how self-coordinating groups of strangers can initiate, refine and complete software projects. Hooray for open source!

Swappable rich text editor

Swappable RTE

Here at Wagtail Towers we have an uneasy relationship with rich text editors. On the one hand, they provide a familiar, intuitive interface to anyone who has used a word processor. On the other hand, they're the evil enemy of structured, reusable content. We chose hallo.js as a least-bad option for Wagtail's RTE, but its text handling is imperfect, and the markup it generates is unpredictable. Matthew dreams of a world where StreamField 2.0 makes rich text obsolete, while Josh is plotting a React-powered takeover. But in the meantime, some users want features that hallo.js doesn't provide, so Wagtail 1.5 includes the hooks to swap in your preferred rich text editor. We worked on this feature with Python agency Isotoma, who have released their plugin for the popular TinyMCE editor, familiar to users of WordPress and many other CMSs.

Improved link handling

Springload's Loic Teixeira has greatly improved the user experience around inserting, editing and removing links inside rich text areas: link destinations are shown as tooltips, and existing links can be edited as well as unlinked.

Everything else

1.5 was a big release. As well as the features described above, we've added better page explorer actions, many improvements to the image serve view, performance enhancements, new translations, better support for custom user models, and tens of other tweaks and fixes. See the release notes for the full list. If only everything in life were free, beautiful and in a state of constant improvement.