PostgreSQL & Django

postgresql
django

#1

Hi,

I would like to use PostgreSQL with my django project.
I follow this tutorial to activate PostgreSQL.
Then I install psycopg2 on my virtual python3 and configure my setting.py database like that :

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'database',
        'USER': 'ubuntu',
        'PASSWORD':'password',
        'HOST':'127.0.0.1',
        'PORT':'',
    }
}

But when I lunch my application I have :

psycopg2.OperationalError: FATAL:  password authentication failed for user "ubuntu"

I try to change password and to GRANT ALL PRIVILEGES ON DATABASE database TO ubuntu; but it returns the same error.
Note : It’s works perfectly with the default database sqlite3 but I want to use PostgreSQL to move the database on my django production serveur.