3 ms·
I've been in the habit of replacing the default manager for my model with one with an annotated query set. that way, any Model.objects.all() call will have the
by cdcarter 3y ago
I've been in the habit of replacing the default manager for my model with one with an annotated query set. that way, any Model.objects.all() call will have the computed fields.
I find this pretty easy to get used to and re-use. though I do admit I like them defined as actual model-fields with verbose names etc...