简体   繁体   中英

Django - Postgres connection

I am super beginner, but want to learn super fast building web application.

I am right now developing an Income-Expense web app on Django Framework (Python, js and Ajax).

I am now stuck with the server and get different errors. Anyone can support me?

ERROR "django.db.utils.OperationalError: connection to server on socket "/tmp/.s.PGSQL.5432" failed: fe_sendauth: no password supplied"

I think I shut down everything not properly and when a came back my virtual environment was not working.

Thank You

Don't know what to try more

To resolve the issue, make sure that you have the correct credentials to access your PostgreSQL database. You may need to update the database settings in your Django settings.py file to include the correct database name, username, password, host, and port information.

for example

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'mydatabase',
        'USER': 'mydatabaseuser',
        'PASSWORD': 'mypassword',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM