Monday, 19 August 2013

settings.DATABASES is improperly configured

settings.DATABASES is improperly configured

total newbie here, sorry
Mac OSX 10.8 Python 2.7 (installed with homebrew)
PostgreSQL 9.4(installed with homebrew)
psycopg2 2.5 (installed with macports)
Django 1.0.4 (installed via python setup.py install)
I'm using this tutorial, and after starting python manage.py shell I ran
>>> from django.db import connection
>>> cursor = connection.cursor()
and got the following:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/dummy/base.py",
line 15, in complain
raise ImproperlyConfigured("settings.DATABASES is improperly
configured. "
ImproperlyConfigured: settings.DATABASES is improperly configured. Please
supply the ENGINE value. Check settings documentation for more details.
The DATABASES section of my settings.py file looks like this:
DATABASE_ENGINE = 'django.db.backends.postgresql_psycopg2'
#postgresql_psycopg2
DATABASE_NAME = 'mydatabase' #mydatabase
DATABASE_USER = 'sarahr6' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not
used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used
with sqlite3.
So I can't figure out why it says it's improperly configured?

No comments:

Post a Comment