@CodenameTim Yes, this technique should work well for the "latest comment in thread" scenario. That might even have been a better example to use 😅
To be honest I was surprised how far I was able to get, I kept thinking I would hit some fundamental limitation of the ORM at some point, but I never did.
I mention the deferring bit at the end of the post. Basically the idea is that if the jsonobject doesn't contain all the model fields, you can still instanciate the model and the missing fields will be deferred (same as if you'd used Django's .defer()/.only()).
I was telling my wife, in Korean, about my Spanish class...and I got two sentences in until I realized I had switched to Spanish without realizing. She doesn't know Spanish. 😅 It's funny, we had a good laugh but frustrating as hell.
Brains are weird. 🤪
Does this happen to you? Any tips on context switching and maintaining that switch?
It's something that's been on the back of my mind for a few years now, but your daily blogging in February really motivated me to actually start doing it.
The computer is use daily is a ~7 year old laptop with a somewhat small SSD. I'm not very good at pruning docker images, so I've been routinely low on storage space.
Well today I completely ran out. The reason? I was running the build script for a PaaS command-line tool and it consumed over 4Gb of storage space.
4Gb. For a CLI tool.
Makes me wonder if there are many examples of this in Django's history. Migrations and JSON fields come to mind, but that's about it.
As a user, one criteria I'd have would be seamless integration once the package gets merged in to core. Ideally I could just switch the import path and be done with it.