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 25 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


Creating Conditional Logic in CSS

Creating Conditional Logic in CSS

There are times that the ability to use conditional statements in CSS would be really handy. CSS lacks any if/else type clauses to enable this, but there is the possibility to arrive at a binary value by combining calc with min & max statements and use the outcome of that to 'decide' what rule to apply.
2024-09-07 01:06:30 UTC
Upgrade PostgreSQL Server: A Simplified Guide for Windows and Ubuntu

Upgrade PostgreSQL Server: A Simplified Guide for Windows and Ubuntu

Upgrading PostgreSQL server binaries and clusters is critical for ensuring the performance, security, and stability of your database.

This guide will equip you with the knowledge and confidence to efficiently upgrade your PostgreSQL server without wading through pages of dense documentation.
2024-05-17 05:45:18 UTC
Build an Intuitive Link StructBlock in Wagtail: Simplifying Link Management for Content Editors

Build an Intuitive Link StructBlock in Wagtail: Simplifying Link Management for Content Editors

Learn how to create a reusable StructBlock in Wagtail that simplifies the management of different link types.

Develop an intuitive, compact, and interactive tabbed interface that empowers content editors to seamlessly select link type, path, and text, all while optimizing page space within the editing interface. Implement a common method to retrieve URL and text for the link regardless of link type, including custom link types.

We'll cover concepts essential for achieving our goal, such as transforming Django's radio select widget into a tab group, constructing an interactive panel interface within the StructBlock using a custom Telepath class, dynamically adding child blocks based on initial parameters, integrating data attributes into block forms, custom StructValue classes and designing adaptable choice blocks.
2024-03-09 00:14:43 UTC
Wagtail Streamfields - Propagating the `required` Attribute on Nested Blocks

Wagtail Streamfields - Propagating the `required` Attribute on Nested Blocks

When adding blocks to a custom Wagtail StreamField StructBlock, whether or not those blocks are required may depend on the required status set in the StructBlock constructor kwargs.

Unlike Django form fields however, in Wagtail's Block class (from which all blocks derive), the required attribute is a read-only property. This means it can only be set in the class declaration rather than during instantiation.

This article presents a straightforward workaround, eliminating the necessity for extensive validation code in each affected block.
2024-02-20 05:09:11 UTC
Efficient Cascading Choices in Wagtail Admin: A Smart Chooser Panel Solution

Efficient Cascading Choices in Wagtail Admin: A Smart Chooser Panel Solution

In the Wagtail admin interface, handling cascading or dependent selections can be a challenge due to the absence of active controls. This tutorial unveils a practical solution by guiding you through the creation of a custom 'chooser' panel. This panel not only elegantly displays dependent elements grouped by their parent element, focusing on categories and subcategories, but also incorporates an intuitive partial match filter for swift and efficient selections.

Learn how to implement this custom chooser panel, providing a one-click method to effortlessly manage cascading selections, enhancing your Wagtail experience.
2024-01-27 00:39:51 UTC
Protecting Your Django Forms: Implementing Google reCAPTCHA V3 for Enhanced Security

Protecting Your Django Forms: Implementing Google reCAPTCHA V3 for Enhanced Security

Learn how to fortify your Django and Wagtail forms against spam and bots using Google reCAPTCHA V3. Discover seamless integration methods, explore the hCAPTCHA alternative, and enhance user experience while maintaining robust security.
2023-12-19 03:10:24 UTC
Crafting a Bootstrap Navbar: How to Create Sticky Items for Persistent Visibility in Collapsed Mode

Crafting a Bootstrap Navbar: How to Create Sticky Items for Persistent Visibility in Collapsed Mode

Explore the art of designing a Bootstrap navbar that goes beyond conventional boundaries. In this guide, discover the secrets to creating sticky items that remain visible even in collapsed mode. Elevate your web design with seamless navigation that ensures key elements are always at your users' fingertips.
2023-12-15 00:49:09 UTC
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