-
Useful Django unit test patternsUseful Django unit test patterns
This is a collection of some common unit test patterns I find myself re-implementing across various projects. To save myself (and maybe some others) time in the future, I've decided to collect them all in one place.
20 March 2026 -
Writing Wagtail StreamField content migrationsWriting Wagtail StreamField content migrations
When you drastically change one of your StreamFields and generate a migration for your new structure, the migration won't actually update what's already in your database. It'll describe the new, intended structure behind the fields, but the JSON data itself will remain exactly as it is.
18 February 2026 -
Directly filtering Wagtail parent/child pagesDirectly filtering Wagtail parent/child pages
In Wagtail, pages don't have a typical, direct relationship like you'd expect in Django. Instead of using foreign keys to link them, each page has a `path` and a `depth` attribute...
24 November 2025 -
Django and Wagtail test factoriesDjango and Wagtail test factories
A factory is a system that lets you easily mock data for your tests and creates as many records as you need for your test cases.
5 November 2025 -
Django: Locking database records before updatesDjango: Locking database records before updates
To 'lock the record' means to tell the database that this particular piece of data is currently in use and shouldn't be given to anyone else who requests it.
15 October 2025 -
HTMX and Wagtail CMS quickstartHTMX and Wagtail CMS quickstart
The first step to using HTMX with any project is loading it into the environment. That can be achieved by following the installation instructions on their website.
28 August 2025 -
Efficient parent/child page querying in WagtailEfficient parent/child page querying in Wagtail
In Wagtail, pages exist within a hierarchical system, where each page has a single parent and potentially several children. The method of storing the page’s hierarchical ‘location’ in the database is slightly atypical.
17 July 2025 -
Wagtail no scheduled publishing optionWagtail no scheduled publishing option
Wagtail supports scheduling a page’s publication date and time out of the box. The first time I tried to use this feature, I lost a lot of time to an issue where the expected ‘Set schedule’ button wasn’t displaying in the page’s ‘Status’ tab.
3 July 2025 -
Using wagtail-seo hours of operation in templatesUsing wagtail-seo hours of operation in templates
wagtail-seo comes with various SEO settings for your site, including fields for ‘Hours of operation’. I needed to take this data and output it on a template in a nice format. This approach is minimal and effective, so if you are also looking to build a global opening hours widget, …
16 May 2025 -
Adding request headers – Dokploy & TraefikAdding request headers – Dokploy & Traefik
I’ve switched over to hosting all my sites with Dokploy. I’ve been enjoying the switch, but have found that there are a few settings which aren’t as simple as clicking a button.
14 May 2025 -
Changing Wagtail ChoiceBlocks without migrationsChanging Wagtail ChoiceBlocks without migrations
I’ve recently been building some content systems within Wagtail that utilise the ChoiceBlock and MultipleChoiceBlock. The project required these to be modifiable without generating migrations for a few reasons, so I’d like to share my solution for facilitating this.
14 May 2025 -
I rebuilt Hermitclock with Wagtail & DjangoI rebuilt Hermitclock with Wagtail & Django
Last year, I launched a website called Hermitclock, dedicated to sharing the local times of the active Hermitcraft members. If you’re unfamiliar with Hermitcraft, it’s a Minecraft survival, multiplayer server full of content creators.
28 April 2025