Hello,
I’m not sure if this have been discussed here already. I didn’t find
anything in Tracker.
What if we allow the change of the default manager of all models? This
could be done through the settings, something like DEFAULT_MODEL_MANAGER.
Examples of use cases are:
- Change the `create` method to do a full clean before saving;
- Filter all entities with a common query like `{deleted: False}`;
- Do some logging…
Of course this can be done if all models extends a custom class (that
change the default manager).
But what about changing it between environments? Like using a mock specific
Manager during the tests, this could be really useful IMO.
Cheers!
--
*[]'s*
*Paulo Poiati*
blog.paulopoiati.com
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/CABqSV%3DKS5AVdtzrShfcP3uTeREziqtO6h7Phm8AJbkFDrRiTGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.