Book notes, The Richest Man in Babylon
Book notes, Deep Work By Carl Newport
Emacs' configuration for Financial Journaling
All the gods, all the heavens, all the hells are within you.
Want to know how to use, and What exactly is F() Query Expression ?
Do you forget to unplug the charging adapter of your laptop, I have a script for you which will notify you.
Django Query Expressions
There’s only one rule in the jungle: when the lion’s hungry, he eats!
Abstraction in Django Models
Let me show you, How to connect multiple databases in Django Application.
Docker, Virtual Machines explained
False == False in [True] will this evaluate to True or False ?
Private methods and variables in Python
Django: Tags and Filter
Updated the blog with references and explanation on the *False == False in [True] ?* expression evaluation
@sandeepk This will not work for related lookups, since custom managers are not used across relations. It is also mentioned here in the docs: https://docs.djangoproject.com/en/3.1/topics/db/managers/#don-t-filter-away-any-results-in-this-type-of-manager-subclass
@tykling Thanks for pointing that out, will update the blog post. Curious to know what you think will be the right approach for this case.
I am thinking of creating a new Manager as shown over here https://docs.djangoproject.com/en/3.1/topics/db/managers/#modifying-a-manager-s-initial-queryset
@sandeepk doing it in a custom manager is fine, just don't remove objects in the default manager. It will appear to work but it will fail in confusing and non-intuitive ways.
@sandeepk Astonishing. I use ledger and Emacs and somehow have never heard of ledger-mode. Thank you!
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!