'Django PostgreSQL Heroku works correctly on localhost, works on Heroku until database used [duplicate]
There are many similar questions on here, but the solutions have not helped and I cannot find this exact case listed.
My project is made with Django and PostgreSQL and deployed on Heroku. When using localhost, everything works well. Deploying to Heroku works and everything works until I make a POST request.
The error I get is Server Error (500). I turned on debug in production and got these messages:
"connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?"
Why would everything work fine on localhost and deploy fine but not work when I begin to use the database?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
