Yacino
Yacino

Reputation: 665

django.db.utils.OperationalError: FATAL: database "Path" doesn't exist

I'm newbie with python and django,

Im trying to setting up Django in windows7,

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': os.path.join(BASE_DIR, 'amour'),
        'USER': 'openpg',
        'PASSWORD': 'openpgpwd',
        'HOST': '127.0.0.1',
        'PORT': '5432',
    }
}

when trying to execute the server: python manage.py runserver

the below error appear :django.db.utils.OperationalError: FATAL: database "Path" doesn't exist

I already install PostgreSql 9.3 and Python 2.7.

Upvotes: 0

Views: 2038

Answers (1)

catavaran
catavaran

Reputation: 45555

You should pass the name of the database, not the filename. So if you created database named "amour" then setting will be:

DATABASES = {
    'default': {
        ...
        'NAME': 'amour',
        ...
    }
}

Upvotes: 1

Related Questions