0

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.

1 Answer 1

1

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',
        ...
    }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.