1

it's my first project to publish with django i try to publish my first project on python anywhere but it still not working and this is my error : could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'arena',
        'USER': 'arenadbuser',
        'PASSWORD': ,
        'HOST': 'localhost',
        'PORT': '',
    }
}
omar ahmed
  • 635
  • 5
  • 19
  • Could you post what have you tried so far? Or you want someone else to debug this for you? For example this: https://stackoverflow.com/questions/38466190/cant-connect-to-postgresql-on-port-5432 – Łukasz Kamiński May 16 '19 at 13:48
  • 1
    Postgres is not free there: https://help.pythonanywhere.com/pages/Postgres and it does not seem like localhost is what you should be using: https://help.pythonanywhere.com/pages/PostgresGettingStarted – Łukasz Kamiński May 16 '19 at 13:55
  • i don't know that Postgres is not free .. it's my first time to deploy project – omar ahmed May 16 '19 at 14:15
  • 1
    if you have paid for the postgres option on PythonAnywhere, on the databases tab, you will see information on what your host and port should be. – conrad May 17 '19 at 13:35
  • https://stackoverflow.com/questions/66232137/github-action-docker-database-migration-fail – richyen Feb 16 '21 at 21:47
  • Hi @omarahmed friend,have you solved this issue finally ? – William Nov 13 '21 at 15:10
  • 1
    Hi @William ... no i deployed this project on "heroku" .. – omar ahmed Nov 14 '21 at 08:55

0 Answers0