Answer the question
In order to leave comments, you need to log in
What is wrong with connecting to the database?
Help plz, ran into an error in connecting Django to Postgres
sudo -u postgres psql
create database base;
create user userwith password 'password';
alter role userset client_encoding to 'utf8';
alter role user SET default_transaction_isolation to 'read committed';
alter role user set timezone to 'UTC';
grant all privileges on database base to user;
\q
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'base',
'USER': 'user',
'PASSWORD': 'password',
'HOST': '127.0.0.1',
'PORT': '',
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question