Adam Johnson
adamj.eu
Adam Johnson
@adamj.eu
🐴 @djangoproject.com blogger and contributor
✍️ Author of three books on Django and Git
🍕 Django London co-organizer
🇬🇧 London / 🇵🇹 Lisbon
TIL, thanks!
November 5, 2025 at 1:14 PM
Did you remember to tell it to be a pytest expert?
November 2, 2025 at 10:55 PM
> I’m looking forward to seeing Django’s refactored template code in 2025

This would be cool… any energy to write a ticket? I'm sure there would be lots of folks keen to give it a try.
October 31, 2025 at 10:48 PM
😱
October 30, 2025 at 12:55 PM
This change saves CPU cycles by not trying to compress binary formats that are typically already compressed, like images or zip files.
October 27, 2025 at 2:51 PM
They dropped the level cap, it goes on forever now
October 24, 2025 at 2:41 AM
yeah holy shit man this is some fantastic writing
October 17, 2025 at 4:00 PM
getsizeof() only reports the size of one object, not including the referenced ones. So here just the `Case` takes 48 bytes.
October 13, 2025 at 4:14 PM
Interesting write-up, thanks!

I wonder if there's an alternative optimziation where we at least compile the `Case` and `When` expressions down into raw SQL strings beforehand. They should have much lower memory usage, at least.
October 13, 2025 at 10:35 AM
Defaulting would be great for sites at scale. The concurrent versions require non-atomic migrations, so they don't easily fit into the framework of batching all changes into one generated atomic migration. There have been discussions around how to make it possible but nothing concrete afaik.
October 13, 2025 at 10:28 AM
There’s a ticket for the ForeignKey migration issue he discusses: code.djangoproject.com/ticket/34417

The PR is half-written with review comments to address, if anyone would like to revive the code and finish it off!
#34417 (AlterField migration on ForeignKey field re-creates foreign key constraints unnecessarily) – Django
code.djangoproject.com
October 12, 2025 at 9:48 PM
Whitenoise handles its own compression. I opened an issue there around adding Zstandard support: github.com/evansd/white...
Zstandard support · Issue #668 · evansd/whitenoise
Description Now Zstandard is in the standard library, we can use it for better compression of static assets. It performs better than Brotli and is widely supported. Rough plan: Add support for Pyth...
github.com
October 11, 2025 at 9:54 PM
thanks for sharing my toilet
October 10, 2025 at 4:13 PM