On 11/6/05, Waylan Limberg <[EMAIL PROTECTED]> wrote: > I'v gone through the first toturial before on another box no problem, > but on this machine I can't seem to get it to work. After setting the > database conection info in myproject/settings.py I try to run > 'django-admin.py init --settings=myproject.settings'. I get the > following error: > > Error: The database couldn't be initialized. > Could not load database backend: No module named psycopg. Is your > DATABASE_ENGINE setting (currently 'postgresql') spelled correctly? > Available optionas are: 'ado_mssql', 'mysql', 'postgresql', 'sqlite3' > > The thing is that I DO NOT have it set to 'postgresql' in > myproject/setting.py but have tried both 'mysql' and 'sqlite3'. I > still get the same message. Oh, and I can 'import myproject' from the > Python interactive prompt without problem, so I know thats not it. > I've tried setting the 'DJANGO_SETTINGS_MODULE' or using the > '--settings' option, but nothing seems to make a difference. Any > suggestions?
Django isn't finding your settings.py file. It's falling back to "postgresql" because that's the default fallback (according to the file django/conf/global_settings.py). Make sure your "myproject" directory is on the PYTHONPATH. You should be able to switch to another, unrelated directory -- such as "/temp/" -- start the Python interactive interpreter and type "import myproject.settings". Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org