Answer the question
In order to leave comments, you need to log in
Django OperationalError - Can't connect to database?
Hello! Can you tell me why when setting up a postgresql database on a production server, after specifying the correct data in DATABASES (settings.py), when trying to migrate, an error about incorrect data still pops up?
Password authentication failed for user TEST
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'myproject',
'USER': 'myprojectuser',
'PASSWORD': 'password',
'HOST': '127.0.0.1',
'PORT': ''5432,
}
}
Answer the question
In order to leave comments, you need to log in
The answer turned out to be banal - you need to write the database name and username in the configuration in lowercase. Kick)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question