Make the implications of order in INSTALLED_APPS more consistent
|Reported by:||Kevin Christopher Henry||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||master|
|Cc:||k@…, Kevin Christopher Henry, mmitar@…, esauro, django@…||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
There are several subsystems that are affected by the order of the apps in
INSTALLED_APPS. These include (at least): templates, static files, translations, and management commands. For the first three, the rule is that the first listed app has precedence: it will be used in preference to any app listed later that uses the same name for something (e.g. a template, file, or translation).
In the case of management commands, however, the semantics are just the opposite: precedence is given to apps that are listed later.
The proposal is to fix this so that management commands follow the same ordering rules as the other subsystems. This is an easy fix, but it has implications for backwards compatibility: specifically, for any project that currently has two apps in
INSTALLED_APPS that define the same command, the one that is actually used will change. (Note that this does not apply to the case of apps overriding core management commands; they will continue to do so.)
See here for a discussion of the issue.
See #20914 for a proposal to document more thoroughly the issue of order in
Change History (16)
comment:1 Changed 4 years ago by
|Cc:||Kevin Christopher Henry added|
|Summary:||Make consistent the significance of app ordering in INSTALLED_APPS → Make the implications of order in INSTALLED_APPS more consistent|
|Type:||Bug → New feature|
comment:6 Changed 4 years ago by
|Component:||Core (Other) → Core (Management commands)|
|Status:||closed → new|
|Triage Stage:||Unreviewed → Accepted|
|Type:||New feature → Cleanup/optimization|
|Version:||1.5 → master|