inter-app dependencies

Right now we have a single entry point for determining what apps should be installed when running Django: INSTALLED_APPS. This is basically a really simple, easy to understand solution. Plus the project template sticks in a bunch of stuff that people need by default. Great stuff.

But right now there’s not really a way that I know of to establish that an app requires another for it to function. So you have to kind of … make this huge list of apps to install, even if, conceptually, you’re thinking of really just “one thing”.

My specific use case is that I have a very large project, with a pretty straightforward but multi-level app dependency tree. Since we use Bazel for testing, in theory we should be able to set up different test suites at each “level” and thus be smarter for testing. But managing the INSTALLED_APPS list manually is a bit frustrating

The one thing I could think of that would make my life much easier is to allow for AppConfigs to provide dependent_apps that would be inserted into the INSTALLED_APPS list.

To be honest I don’t know how many real use cases there are for this (I know we’re on the high end for project size) but I was wondering if there has ever been chatter on this front

There is GitHub - nephila/django-app-enabler: autoconfigurator for django applications but nothing inside core yet. Truth to be told I am not sure your suggestion would make sense for core. The problem is that INSTALLED_APPS is just the first step; what about middlewares, context processors etc… (ie all the things you need to configure to make your project behave as it should).