Day 8 Dev Notes

OK, this is starting to take shape. At least in my head it is.

I've decided to separate out the djpress package into a standalone package and will eventually publish it to PyPi. I've also refactored a lot of code, and now I'm starting to work out what I want from this package.

Read more...

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

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

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

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

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.

1 2 3