-
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 -
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 -
Writing a Minimal Wagtail, Poetry & Node DockerfileWriting a Minimal Wagtail, Poetry & Node Dockerfile
Over the last few months, I have worked extensively on several Wagtail projects. Off the back of this, I have decided to pivot from focusing on WordPress development in favour of Django and Wagtail.
8 April 2025 -
Dockerise Django and NPM with Multi-Stage BuildsDockerise Django and NPM with Multi-Stage Builds
I’ve recently started learning Django, the popular web development framework for Python. Until now, as a PHP developer, I’ve been rather spoiled with the ease of deploying projects thanks to software such as cPanel or Plesk.
11 November 2024 -
Auto-refresh the Browser on File Save with DjangoAuto-refresh the Browser on File Save with Django
I’ve recently started learning Python’s Django framework and have brought my favourite JavaScript framework along with me: TailwindCSS. From a development standpoint, I find that TailwindCSS feels much more efficient when I don’t have to refresh the page every time I make a change.
1 November 2024