#21630 closed Cleanup/optimization (fixed)
Simplify find_management_module
Reported by: | Aymeric Augustin | Owned by: | |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
There's a comment that says: "When using manage.py, the project module is added to the path, loaded, then removed from the path."
I believe manage.py no longer does that since 1.4 (new project layout). As a consequence the code could be simplified.
Attachments (1)
Change History (13)
follow-up: 7 comment:1 by , 11 years ago
comment:2 by , 11 years ago
I think we've had the new layout long enough - other things which tried to do clever stuff around this have been removed from what I remember. +1 to removing this.
comment:3 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 11 years ago
Attachment: | 21630.diff added |
---|
comment:5 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:6 by , 10 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
Triage Stage: | Accepted → Ready for checkin |
Yes, your approach seems correct to me. I'd rather remove this stuff and see if someone has an edge case that breaks than leave it without knowing why. The patch will require a small update to apply after 486532. I'll let you push it!
comment:7 by , 10 years ago
Replying to ramiro:
But, shouldn't that code remain as is to stay compatible with existing project that use old the layout? Or this isn't a supported scenario?
Because of the app-loading refactor, I don't think it'll be possible to use the old layout with Django 1.7.
comment:8 by , 10 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:9 by , 10 years ago
I'm not convinced this has to be backported to 1.7. If you think it should, just speak!
comment:10 by , 10 years ago
Yes, I think it should be backported, because if it breaks something, that will be seen as collateral damage of app loading.
Thought the same when trying to work on #15084 and reviewing that code.
But, shouldn't that code remain as is to stay compatible with existing project that use old the layout? Or this isn't a supported scenario?