Tonight I wanted to get a local copy of Django set up and running, with the aim of taking some baby steps towards contributing to Django. I was expecting this to be much harder, but after following the steps outlined in the Django docs, but substituting in some uv commands, I was up and running and fully tested within about 5 minutes.
I've been making extensive use of my "AI friends" over the last few months, switching between Google's Gemini, OpenAI's ChatGPT, Perplexity's AI search engine, Inflection AI's Pi, Microsoft's Copilot (both in Bing as well as extensively in VS Code with Github Copilot), and Anthropic's Claude.ai. I mention Anthropic last, because this is my new favourite! The new Claude 3.5 Sonnet is genuinely incredible and feels like it's a step ahead of the rest.
More documentation of the template tags. And during my documentation, I decided to change the Category model to be more consistent with the Post model. This required a migration change and a bunch of refactoring, so I bumped the version.
Started the long process of documenting everything I've done so far, starting with the template tags. There are 24 template tags so far, and I've now documented the first three!
Just did some minor tweaks on the styling on this site today. I really enjoy playing with modern CSS - it's so easy to make simple but complex (if that makes sense) changes. Also, having GitHub Copilot in VS Code makes this even easier. Now, when this site is viewed on mobile, there are no more overlapping elements that overflow into the margins.
Just a few minor updates this evening. HTMX v2 was released, so I updated this on the Bus Times app and on this blog. It was pretty straight-forward since the major breaking change related to the hx-on tag which I wasn't using anywhere.
I added a new utility to the site tonight: the Markdown editor I had created with Pyscript. This gave me some ideas about adding new Markdown extensions to the editor. But to make this work, I had to push an update to DJ Press to allow custom extension configs.
Refactored the pagination links today in DJ Press, and then added some new ones to give some more flexibility. I've always had a goal with this package to be able to create fairly complex templates without needing to understand the models or the context being sent by the views.
I caught up on the development I've done this week on DJ Press but running the Coverage reports and catching up on missing tests. I'm really enjoying testing at the moment - something we feels like a chore at first, becomes really satisfying when the testing improves the quality of the code too.
Continued work on the Pages support. Starting to look better, especially after I got the tests all working again. Now I have to go through the Coverage reports again and get the coverage back up to 100%.
More work on the pages tonight. I wanted to be able to create a menu of the pages somewhere on the page. So I first added a menu_order field to the Posts table, and then added some template tags to get the pages, sort them by menu_order first, and then by title second.
Tested it out and it all seemed to work OK, but more refactoring required.
Still working on the template tags for DJ Press. I realised that in taking inspiration from WordPress, I'm unnecessarily complicating things in the templates. So I'm now moving some of the logic back to the views in order to simplify things.
I pushed an update to DJ Press and then incorporated the changes into this site. It was a breaking change, so I had to tweak the template tags to make it work. This has highlighted some further changes I need to make to the tags.
Finally managed to get around to implementing Pagination. This was the first time in a long time that I've had to implement pagination, so I was pretty much starting from scratch.
More work on the template tags tonight. I'm getting closer to my goal of having a similar template structure to the old WordPress Classic blogs. In particular, I'm using this template file as my inspiration: https://themes.svn.wordpress.org/classic/1.6/index.php