Remove explicit support for bad practices
|Reported by:||FunkyBob||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.4|
|Cc:||preston@…||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In django/db/models/loading.py in AppCache.register_models the comments say:
# The same model may be imported via different paths (e.g.
# appname.models and project.appname.models). We use the source
# filename as a means to detect identity.
Overlapping import paths lead to many unobvious errors -- especially with signals. Explicitly covering for people persisting in this poor behaviour, which the new project layout was supposed to help avoid, is not doing anyone any favours.