Code

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#141 closed defect (fixed)

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

Reported by: sdelatorre@… Owned by: adrian
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: UI/UX:

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.

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.