Is the server running on host “localhost” (127.0.0.1) and accepting TCP/IP connections on port 5432?

后端 未结 1 2062
别跟我提以往
别跟我提以往 2021-01-21 00:51

I tried to deploy my Django project on Heroku but everytime I try \'heroku run python3 manage.py migrate\' I get this error:

/app/.heroku/python/lib/python3.6/si         


        
1条回答
  •  抹茶落季
    2021-01-21 00:52

    Alright, I got the solution. I need to add this into my settings.py file:

    from decouple import config
    DATABASES = {
        'default': dj_database_url.config(
            default=config('DATABASE_URL')
        )
    }
    

    0 讨论(0)
提交回复
热议问题