Introduction 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, then you’re in the […]
Introduction 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. The Code When copying from the following examples, be sure to update the class’ path […]
Since January, I’ve worked full-time in Django and Wagtail development. In my last post, I shared my Dockerfile for deploying such projects. That Dockerfile includes a multi-stage build to reduce the final image size and to improve security. This directly builds on that Dockerfile. The Dockerfile The important part here is lines 48-50. We’re copying […]
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. A big consideration that has come with this decision is managing the deployment of my projects. As a big Docker advocate, […]
Introduction I’ve built several projects using Pygame, such as a solar system simulation and a Zelda-like dungeon crawler. My biggest frustration has always been the complexity of sharing the projects with others. As a web developer, I’m very accustomed to being able to share my work online. Enter: Pygbag. Demo In case you’re not familiar […]
Introduction 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. At first, I wasn’t entirely certain about how I could […]
Introduction This article will guide you through setting up a GitHub workflow that automatically updates your PYPI package upon a new GitHub release, using my zomboid_rcon repository as a practical example. Understanding the Workflow The process involves a GitHub workflow specifically designed to upload a Python package to PYPI when a new release is published. […]
Introduction If you’re delving into the world of Python programming, you might find yourself needing to convert your Python scripts into executables (.exe) files, especially for ease of distribution among Windows users. A popular tool for this task is PyInstaller, but there are a few key points and nuances to be aware of during this […]
Basic custom decorator functions Python decorators are functions which you call on top of another function to expand its functionality. Some common use cases include logging, adding delays or timeouts to function executions, extending behaviours and more. Here’s a basic example: In the above example, our initial function is called with decorator called ‘decorator’ just […]
What are Threads in Python? Threads in Python are separate flows of execution. Typically, a simple Python program is single-threaded. This means everything happens in a sequence one after the other. Your program will execute line-by-line and only after one line has finished will the next one begin. Implementing additional threads means that you can […]
Analytics Cloudflare CRON Django Docker Dokploy Email Hosting Git Hermitclock Laravel NGINX NPM PHP Plesk Pygame Python Snippets Wagtail WireGuard WordPress