#142 closed defect (duplicate)
tutorial 1 bug in init --settings
Reported by: | Jason Huggins | Owned by: | Jacob |
---|---|---|---|
Component: | Documentation | Version: | |
Severity: | normal | Keywords: | tutorial django-admin init settings |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In tutorial1, rev 253, line 77:
django-admin.py init --settings='myproject.settings.main'
should be:
django-admin.py init --settings=myproject.settings.main
With Windows XP, Python 2.4.1, Django rev 282, I get this error when the quotes are present:
C:\MyStuff\projects\django>c:\Python24\python.exe C:\Python24\Lib\site-packages\ django-1.0.0-py2.4.egg\django\bin\django-admin.py init --settings='myapp.setting s.admin' Traceback (most recent call last): File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\bin\django-a dmin.py", line 103, in ? main() File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\bin\django-a dmin.py", line 68, in main ACTION_MAPPING[action]() File "c:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\managem ent.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\__in it__.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\setting s.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 ''myapp.settings.admin '' (is it on sys.path?): No module named 'myapp.settings.admin'
When I remove the quotes, I don't get an error, and my database is initialized correctly.
C:\MyStuff\projects\django>c:\Python24\python.exe C:\Python24\Lib\site-packages\ django-1.0.0-py2.4.egg\django\bin\django-admin.py init --settings=myapp.settings .admin C:\MyStuff\projects\django>
Note:
See TracTickets
for help on using tickets.
Doh.. just realized this is a dupe of #141.