Opened 10 years ago

Closed 10 years ago

#3154 closed defect (invalid)

Error in naming modules | packages autogenerated by "django-admin startproject proj0"

Reported by: opera7@… Owned by: Adrian Holovaty
Component: Core (Management commands) Version: master
Severity: critical Keywords: django-admin startproject settings
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Win32, python 2.4, Django r4218 fresh install

E:\DJ>django-admin startproject proj0
\---proj0
    |   manage.py
    |   settings.py              <- !!!!!!!
    |   urls.py
    |   __init__.py
    |
    +---apps
    |       __init__.py
    |
    \---settings                 <- !!!!!!!
        |   admin.py
        |   main.py
        |   __init__.py
        |
        \---urls
                admin.py
                main.py
                __init__.py
E:\DJ>cd proj0
E:\DJ\proj0>py manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 11, in ?
    execute_manager(settings)
  File "C:\Python24\Lib\site-packages\django\core\management.py", line 1447, in execute_manager
    execute_from_command_line(action_mapping, argv)
  File "C:\Python24\Lib\site-packages\django\core\management.py", line 1347, in execute_from_command_line
    from django.utils import translation
  File "C:\Python24\Lib\site-packages\django\utils\translation\__init__.py", line 3, in ?
    if settings.USE_I18N:
  File "C:\Python24\Lib\site-packages\django\conf\__init__.py", line 27, in __getattr__
    self._import_settings()
  File "C:\Python24\Lib\site-packages\django\conf\__init__.py", line 54, in _import_settings
    self._target = Settings(settings_module)
  File "C:\Python24\Lib\site-packages\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 'settings.settings' (Is it on sys.path? Does it have syntax errors?): No module named settings

The evident confusion with "settings" name.

Change History (3)

comment:1 Changed 10 years ago by floguy@…

I have tried and cannot reproduce this error. Can you please provide some more information about your system setup? Are there any other steps that you have done to make this situation happen?

comment:2 Changed 10 years ago by (none)

milestone: Version 1.0

Milestone Version 1.0 deleted

comment:3 Changed 10 years ago by Simon G. <dev@…>

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top