Day 7 Dev Notes

The problem with architecting on the fly, is that it requires a lot of re-work as you work through the design of the solution and have to fix up previously written code. That's the issue I'm dealing with here, but this is all part of the learning experience.

I noticed some caching issues with the posts yesterday, after I was playing around with publishing future posts. This was caused by using the built-in local memory cache in Django, which is process-specific. I didn't really comprehend what this meant until I thought it through as part of my troubleshooting. The problem can occur when using multiple Gunicorn workers, since each one starts up its own process and thus has its own local memory cache. The impact of this is that each process could have a different cache depending on when the cache was set, and then on each page refresh you could see different posts depending on which process you're accessing.

Read more

Posted on Apr 30, 2024 by

Categories: Development

Day 6 Dev Notes

This morning, I wanted to implement a simple, category-based, menu in the navbar. As with most things, this was simple to implement, but I then spent some time optimising it, which lead me down an interesting pathway. Here's what I accomplished...

Read more

Posted on Apr 29, 2024 by

Categories: Development

Day 5 Dev Notes

So far, so good - 5 days in a row! 👍

Just minor tweaks again today, since today was spent working in the garden and then playing golf.

Read more

Posted on Apr 28, 2024 by

Categories: Development

Day 4 Dev Notes

Just a small tweak today. I still wasn't happy with the truncated posts because there was no indication that the post had been truncated when viewing it on the home page. To fix this, I added a boolean property to the Content model to indicate if a post had been truncated, and then added a "Read more" link.

The other small tweak I made was to move the `

Read more

Posted on Apr 27, 2024 by

Categories: Development

Auckland Photo from Hotel Room

Here's the view from our room at the Holiday Inn Express in Auckland. This is a great hotel: reasonably priced rooms which are modern, new, and clean. And it includes a great buffet breakfast too.

Read more

Posted on Apr 26, 2024 by

Categories: General

Day 3 Dev Notes

I'm up in Auckland at the moment - the girls are at a concert, and I've been hanging in the hotel room, adding a couple of new features.

Read more

Posted on Apr 26, 2024 by

Categories: Development

Day 2 Dev Notes

On Day 2 I worked on this site.

I tidied up the models, added more tests, tweaked the templates a bit, but most importantly I moved this into "production".

Production means it's running on my Docker infrastructure, has a Github build action that publishes a Docker image, and will re-deploy when pushing to the main branch.

Read more

Posted on Apr 25, 2024 by

Categories: Development

Day 1 Dev Notes

On day 1 of this journey I created the dev version of this site with just two basic models and three views.

Github link

(That link is private for now)

Posted on Apr 24, 2024 by

Categories: Development

Hello, world!

Well, this is the first post on my stuartm.nz site.

Custom developed on Django, this is meant as a learning environment where I can experiment with new Python/Django skills I learn. I will also use this to keep track of inflight projects with the aim of releasing actual products that generate income.

This site is intentionally starting off as a true minimum viable product. Over time, I'll build on the package that is providing the content management, and possibly I'll release this as a Django package on PyPI.

Posted on Apr 24, 2024 by

Categories: General