Opened 19 years ago

Closed 19 years ago

Last modified 17 years ago

#141 closed defect (fixed)

--settings option doesn't work as shown in the tutorial

Reported by: sdelatorre@… Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When running django-admin.py init --settings='myproject.settings.main' (as specified in tutorial 1) I received:

C:\www\webroot\myproject>django-admin.py init --settings='myproject.settings.main'
Traceback (most recent call last):
  File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\bin\django-admin.py", line 103, in ?
    main()
  File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\bin\django-admin.py", line 68, in main
    ACTION_MAPPING[action]()
  File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\management.py", line 278, in init
    from django.core import db, meta
  File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\db\__init__.py", line 16, in ?
    from django.conf.settings import DATABASE_ENGINE
  File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\conf\settings.py", line 34, in ?
    raise EnvironmentError, "Could not import %s '%s' (is it on sys.path?): %s"% (ENVIRONMENT_VARIABLE, me.SETTINGS_MODULE, e)
EnvironmentError: Could not import DJANGO_SETTINGS_MODULE ''myproject.settings.main'' (is it on sys.path?): No module named 'myproject.settings.main'

The problem is with the quotes around the module name (--settings='myproject.settings.main'). Running django-admin.py init --settings=myproject.settings.main (no quotes) works correctly.

Change History (1)

comment:1 by Jacob, 19 years ago

Resolution: fixed
Status: newclosed

(In [284]) Fixed #141 -- thanks sdelatorre@…

Note: See TracTickets for help on using tickets.
Back to Top