Generic autodiscover() mechanism
|Reported by:||niconoe||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
For an app I'm currently working on, I was looking to implement some configuration mechanism to load and execute my_app_config.py files in other installed apps directories, similar to how we configure the admin site through multiple admin.py files and by calling the admin.autodiscover() function.
It seems a quite common pattern found in many other apps (Django CMS, django-admin2, ..), but I was quite surprised to see that everyone seems to reinvent the wheel in this aspect. Shouldn't we provide a clean public-facing function (in django.utils) to do exactly this ?
If it appears that the use-cases are too different to be code-factorized, maybe we should instead improve documentation in this aspect, providing some best practices on this subject ?
Should I start working on one of these two approaches ?