django-admin startapp doesn't check for conflicts in naming
|Reported by:||David Sauve <dnsauve@…>||Owned by:||nobody|
|Severity:||Keywords:||django-admin admin module error|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
It is possible to create a new application using django-admin.py that has a name that will conflict with a module that already exists in the Python path.
This can be especially difficult for a newcomer to Python and Django to track down since the error messages generated do not indicate what when wrong, only that the key module symbols are missing.
I found this by creating an application called "calendar". Afterwards, the admin interface no longer worked for me because "isleap" was not defined in my version of "calendar", obviously.
However, I'm not sure how this could be prevented. Possibly the best solution would be to indicate the full path to the module (not) containing the required symbols? In my case, if the error had indicated that mysite.calendar did not define isleap, I would have realised my error right away!
Change History (7)
comment:1 Changed 8 years ago by guettli
- Has patch set
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted