I have a problem with Django database configuration with 'postgresql_psycopg2' If I give any arbitrary name to my database like below,
DATABASES = {
'default': {
'ENGINE': 'postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'xyz', # Or path to database file if using sqlite3.
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': '${my_password}', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
'OPTIONS': {
"autocommit": True,
}
}
}
>
OperationalError at /
FATAL: database "xyz" does not exist
I surf a lot and findout same that with SQLite we have to specify absolute path to our database; with PostGRE likewise above.
I would like to know:
1) Why I am getting error message with above specification and
2) How I use my database which i am using with Development server lay out in filesystem (windows).
psycopg2
installed? – Ananthous