|
I'm stuck at Step 2 (Database). I've tried explicitly setting DJANGOSETTINGSMODULE to "osqa.settings" to no avail. Any help is greatly appreciated. Here's the error output: (from the osqa dir) $ python manage.py syncdb Traceback (most recent call last): File "manage.py", line 4, in <module> import settings # Assumed to be in the same directory. File "/home/larubin/djangoprojects/osqa/settings.py", line 60, in <module> from settingslocal import * File "/home/larubin/djangoprojects/osqa/settingslocal.py", line 78, in <module> from forum.settings import * File "/home/larubin/djangoprojects/osqa/forum/settings/init.py", line 3, in <module> from forms import ImageFormWidget File "/home/larubin/djangoprojects/osqa/forum/settings/forms.py", line 2, in <module> from django import forms File "/usr/lib/python2.5/site-packages/django/forms/init.py", line 17, in <module> from models import * File "/usr/lib/python2.5/site-packages/django/forms/models.py", line 6, in <module> from django.db import connections File "/usr/lib/python2.5/site-packages/django/db/init.py", line 14, in <module> if not settings.DATABASES: File "/usr/lib/python2.5/site-packages/django/utils/functional.py", line 281, in getattr self.setup() File "/usr/lib/python2.5/site-packages/django/conf/init.py", line 38, in _setup raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENTVARIABLE) ImportError: Settings cannot be imported, because environment variable DJANGOSETTINGSMODULE is undefined. Error: Can't find the file 'settings.py' in the directory containing 'manage.py'. It appears you've customized things. You'll have to run django-admin.py, passing it your settings module. (If the file settings.py does indeed exist, it's causing an ImportError somehow.) |
|
Looks like there is some kind of error in your settings file that's causing an import error. Have you renamed settingslocal.py.dist to settingslocal.py? Yes. I have renamed settings_local_py.dist to settings_local.py. The DJANGO_SETTINGS_MODULE problem seems to be a symptom of a larger problem related to the search path. The current working directory from which "python manage.py syncdb" is called does not seem to be on that path.
(16 Apr '10, 11:50)
larubin
|