Opened 18 years ago
Closed 17 years ago
#3475 closed (wontfix)
Creating apps with certain names causes manage.py to stop working
Reported by: | svant | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Keywords: | manage.py, startapp | |
Cc: | frankie@…, jdunck@… | Triage Stage: | Design decision needed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
manage.py should not allow creating an app with a certain name when that could break manage.py itself.
after doing manage.py startapp site I got the following error when trying to do something with manage.py
Traceback (most recent call last): File "path\manage.py", line 2, in ? from django.core.management import execute_manager ImportError: No module named django.core.management
Attachments (3)
Change History (10)
by , 18 years ago
Attachment: | invalid_app_names.patch added |
---|
comment:1 by , 18 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 18 years ago
Triage Stage: | Ready for checkin → Design decision needed |
---|
(Only triagers and committers should move tickets between stages, please.)
I think we need to think about how far we want to go here. Do we put every standard Python module in the list? If not, why do we only put some in?
I'm probably -1 on this idea at the moment, because it's so hard to draw the line and not naming your modeuls after standard Python modules is not a Django-specific requirement.
comment:3 by , 18 years ago
Oops, is triage limited to an exclusive bunch or am I just excluded from triage because of doing the patch?
Anyway, yeah. I agree. As far as I can see there are too solutions:
- Don't do any checking. This is fair enough, but in this case project names should not be checked either.
- Make checking more dynamic. As in eval() it and if it comes out as anything but NameError say it's invalid.
by , 18 years ago
Attachment: | invalid_app_and_project_names.patch added |
---|
This patch check for invalid project and app names in the way previously mentioned.
comment:4 by , 18 years ago
Cc: | added |
---|
comment:5 by , 17 years ago
Cc: | added |
---|
comment:7 by , 17 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The problem with this is it's a false sense of security. It doesn't prevent you creating a problem later without knowing what went wrong. You always need to be aware of name collisions and we can't really protect people from that.
Against [4485]