-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introspect AppConfig instead of requiring users to declare ARCHES_APPLICATIONS #11009
Comments
@jacobtylerwalls It looks like this may not be possible, we need this information available when https://docs.djangoproject.com/en/5.0/ref/applications/#initialization-process |
I think we can just call django.setup(). I'm making good progress just using that. |
Cool, didn't work for me but I'm interested to see what you come up with! 🤞 |
Yeah you put your finger on it, the settings.py file itself is the hardest place to do this, but I have a little PoC to look at. If we extend this with other attributes |
Prevents circular import error when executing settings.py as a module.
Prevents circular import error when executing settings.py as a module.
Prevents circular import error when executing settings.py as a module.
…ations Declare arches applications in AppConfig #11009
Fixed in #11016 |
In future work, what do you think about removing the ARCHES_APPLICATIONS setting altogether? It's occurred to me before that it's the job of the arches application, not the installer, to know whether the app is arches-related.
If the AppConfig in an arches application had
is_arches_application = True
, then anywhere in core that reads from that setting could just interrogate it like this (probably as a property or something):...and then anybody installing it doesn't have to know or care about installing it as an ARCHES_APPLICATION, it just goes into INSTALLED_APPS like every other django app and call it a day.
Originally posted by @jacobtylerwalls in #11002 (comment)
The text was updated successfully, but these errors were encountered: