Daily Dev Notes 2024/06/19

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.

Read more...

Daily Dev Notes 2024/06/16

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.

Read more...

Daily Dev Notes 2024/06/14

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.

Read more...

Daily Dev Notes 2024/06/13

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

Daily Dev Notes 2024/06/12

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.

Daily Dev Notes 2024/06/11

First crack at static pages tonight. It's a bit rough around the edges but worked OK.

Not too happy with it right now, so will hold off committing code until I can figure it out. But so far I have:

  • a PagesManager for all the page-related model code
  • a template tag to display a page link: {% page_link "about" outer="li" %}
  • and modified the post_detail view to first look for a matching page before trying to get the post.

Read more...

Daily Dev Notes 2024/06/10

OK, made some good progress tonight. Refactored the post and posts contexts for all the views, and then had to update the tests to match.

Then I had my first crack at implementing template hierarchy. Again, inspired by the old WordPress template files.

Read more...

Daily Dev Notes 2024/06/08

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.

Read more...

Daily Dev Notes 2024/06/03

Finally got to 100% test coverage! This has been a great experience and I've learned so much about testing by divining into some gnarly edge-cases. It's also told me that even the bits of code that I thought I was properly testing, needed further tests to fully cover the edge-cases.

Read more...

2