Welcome to Enzed Online!

What does a Kyrgyz glacier have to do with an IT consultancy? Not a lot, but it does highlight one of the fundamental keys of engagement in web design: to pique curiosity on landing on your site to encourage reading on, you've generally got a couple of seconds to do that before the visitor's attention span runs out and they move on to the next attention grabber. Mostly though, it's there because Kyrgyzstan has some of the best and most undeveloped hiking I've ever come across. If you have a chance, go!

This website was created using Python, Django, and Wagtail CMS. On the tech blog, I'll be sharing plenty of experiences, pitfalls, and tips for anyone who might find this beneficial.

About me: I have 23 years of experience in IT across a broad range of industries and roles, mostly as a contractor and consultant, ultimately as head of IT for a leading international tourism company in New Zealand. In between, I love to travel, hike and photograph (the three happily go together), as well as experiment with different cuisines from around the world.

These days, you'll find me in the countryside close to Wellington. If you're an employer looking to fill a position in your team that you believe I'd be a good fit for, either on a project basis or on a more permanent basis, please visit my About page or contact me directly here. I have rights to work in New Zealand, the UK, Spain and Australia, and would be happy to consider other locations as well.

Tech Blog

Here, I'll be sharing insights from my professional experiences, studies in data science and web development, and explanations of how this site was built for anyone interested in learning.

Personal Blog

If technology isn't your thing, check out my other major passions: travel, hiking, photography, and world cuisine. I like to combine as many of these as I can whenever I get the opportunity ...

Latest Blog Posts


Unlocking Enhanced Navigation with Bootstrap: A Guide to Submenus in Dropdown Menus

Unlocking Enhanced Navigation with Bootstrap: A Guide to Submenus in Dropdown Menus

Bootstrap has a notable feature gap: it doesn't provide a native component for nesting dropdown buttons. In this article, we'll delve into the art of crafting submenus within Bootstrap dropdown menus. You'll gain insights into seamlessly incorporating them into navbar dropdown menus, handling both collapsed and expanded views. Elevate your web navigation with Bootstrap submenus!
2023-09-26 05:21:53 UTC
Creating Custom Django Form Widgets with Responsive Front-End Behaviour

Creating Custom Django Form Widgets with Responsive Front-End Behaviour

This article will take you through the process of creating custom Django form widgets with responsive front-end behaviour. Create a custom Django template and learn how augment an existing widget with additional HTML and embedded JavaScript. For Wagtail users, learn how to seamlessly integrate your custom widget into FieldPanels and StructBlocks.
2023-09-16 03:51:11 UTC
Creating Wagtail Streamfield StructBlocks with a Customised Editor Interface

Creating Wagtail Streamfield StructBlocks with a Customised Editor Interface

This article will take you through the process of creating custom Wagtail Streamfield StructBlocks. You will learn how to customize the editing interface with CSS and JavaScript to achieve responsive front-end behaviour.

I'll demonstrate the creation of a StructBlockAdapter and the registration of JavaScript using Telepath. Additionally, I'll give a real-world example, showing how to include a custom StructBlock as a component of a parent StructBlock.
2023-07-10 06:19:58 UTC
Importing Text From File Into a textarea HTML Form Field

Importing Text From File Into a textarea HTML Form Field

This article covers how to add the ability to read the contents of a text file into a textarea form field from the front end without need to upload anything to the server. We'll go through adding a file input button with file type filter, enabling drag/drop and setting up the necessary JavaScript to handle both events.

We'll tie this together by creating a custom FieldPanel in Wagtail's CMS and add some CSS to tidy things up.
2023-05-23 10:20:50 UTC
Wagtail - Creating Custom Choosers with Viewsets

Wagtail - Creating Custom Choosers with Viewsets

Wagtail has a number of basic views for common activities like generating / modifying model instances and chooser modals. Because these frequently involve several related views with shared properties, Wagtail also implements the concept of a viewset, which allows a group of views to be defined and their URLs to be registered with the admin app as a single operation.

This article demonstrates how to create a custom chooser modal for the User model and add responsive filtering to search for records based on a defined set of columns.
2023-04-18 11:23:46 UTC
Add Unaccent Support in PostgreSQL Search

Add Unaccent Support in PostgreSQL Search

PostgreSQL has a some pretty useful NLP search capabilities out of the box. However, PostgreSQL search backends will only load the character set native to the language you've set your backend to use. Accented words on an English site won't be searchable with unaccented terms for example.

I show a quick way to load the full extended character set into a custom backend and take you through how to verify that the search is indexing and returning results as desired from the command prompt. Finally, I'll use the custom backend for my Wagtail site search to return pages with unaccented queries.
2023-01-08 00:01:22 UTC
Wagtail: Extending the Draftail Editor Part 4 - Custom Lists

Wagtail: Extending the Draftail Editor Part 4 - Custom Lists

The fourth part of this series looks at creating custom lists in Draftail, including the limitations considering this is not currently a supported feature in the editor.

I'll show how to create custom list styles within those limitations, and also how you can use a custom list to apply styling around a group of consecutive blocks of the same type.
2022-12-29 19:06:17 UTC
Configuring a Dynamic Sitemap on Wagtail

Configuring a Dynamic Sitemap on Wagtail

A sitemap lists a website’s most important pages, making sure search engines can find and crawl them. It's important to keep your sitemap up to date for optimal SEO.

With a quick bit of coding, you can set your sitemap to be created dynamically on demand, ensuring it always reflects the latest content.

We'll go through adjusting the lastmod field, and add values for the changefreq and priority on site, class or page level.

I'll show you how to add support for xhtml alternate entries for multi-lingual sites using a custom view in place of the built-in Wagtail sitemap app.

Finally, I add a method to notify Google of updates automatically on page publish/delete.
2022-12-22 18:25:06 UTC
Making Wagtail pages more SEO friendly with Wagtail Metadata

Making Wagtail pages more SEO friendly with Wagtail Metadata

Wagtail pages are great for creating a lot of rich content straight out of the box, but for SEO optimization, they need some tweaking.

Here, I subclass the Page model with some help from the wagtail-metadata plug-in.

This subclassed model becomes the base for all site pages and holds all the data for og metadata, twitter cards, page description etc..
2022-12-22 18:24:27 UTC
Improve Response Times and SSL Security on Your NGINX Web Server

Improve Response Times and SSL Security on Your NGINX Web Server

NGINX is a lightweight and fast web server that meets the content delivery needs of most small to medium sites. Loading speed is now a crucial metric in how the search engines rank websites.

With a little basic configuration you can vastly improve the performance of your server and reduce delivery times. Here, I give an introduction to enabling HTTP/2, gzip compression and cache headers.

We'll also add a few changes to tighten SSL security with a stronger ciphers list, Strict Transport Security (HSTS) and add a CAA record to our DNS.
2022-12-22 16:49:22 UTC
Loquat Chutney

Loquat Chutney

Loquats have to be one of the most underrated fruits around, although their season is so short fruiting briefly in the springtime. While it's a short season, the trees produce a vast amount of fruit all at once. Here's a great way to preserve some of that excess fruit.
2022-12-19 15:34:03 UTC
Create Thumbnails with Preserved Edges Using Python Image Library

Create Thumbnails with Preserved Edges Using Python Image Library

The Python Image Library (Pillow or PIL) has a host of image processing methods available to create images on-the-fly.

If you ever had the annoyance of uploading an image to a website, only to have it cropped to fit a certain aspect ratio, then this article is for you. I walk through creating thumbnails where the entire image is displayed without cropping or stretching while meeting the thumbnail dimension requirements

I'll also go through how to add this as an image filter in Wagtail so you can create thumbnail renders for your metadata.
2022-11-04 17:43:59 UTC