Opened 18 years ago
Closed 18 years ago
#3299 closed defect (fixed)
[patch] the name of project cannot have the name "site"
Reported by: | anonymous | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | site INVALID_PROJECT_NAMES |
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
hi all,
$django-admin.py startproject site
$cd site
$python manage.py runserver
and he say he is in a bad moon
Traceback (most recent call last): File "manage.py", line 11, in ? execute_manager(settings) File "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/management.py", line 1319, in execute_manager execute_from_command_line(action_mapping, argv) File "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/management.py", line 1237, in execute_from_command_line from django.utils import translation File "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/utils/translation/__init__.py", line 3, in ? if settings.USE_I18N: File "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/conf/__init__.py", line 27, in __getattr__ self._import_settings() File "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/conf/__init__.py", line 54, in _import_settings self._target = Settings(settings_module) File "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/conf/__init__.py", line 82, in __init__ raise EnvironmentError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e) EnvironmentError: Could not import settings 'site.settings' (Is it on sys.path? Does it have syntax errors?): No module named settings
to bypass that just not name your project "site", but I thing when you start with you have that error, you spend lots of time to find what's going wrong,
a simple message with " site bad name change name" is not a lot.
Attachments (1)
Change History (5)
comment:1 by , 18 years ago
by , 18 years ago
Attachment: | management.diff added |
---|
Patch which adds 'test' to INVALID_PROJECT_NAMES and improves the error message
comment:2 by , 18 years ago
Summary: | the name of project cannot have the name "site" → [patch] the name of project cannot have the name "site" |
---|
Added a patch which inserts 'site' into INVALID_PROJECT_NAMES
and improves the error message by pointing out that the problem is a conflict with the name of an existing module.
comment:3 by , 18 years ago
Keywords: | site INVALID_PROJECT_NAMES added |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:4 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This should actually be added to
INVALID_PROJECT_NAMES
indjango.core.management
;site
is a core module of the Python language and we shouldn't allow projects to be given names which conflict with it (we already don't permit a couple of names which would cause conflicts).