Connect Postgres to a remote server(pgAdmin4)
Step 1: Create a server. Right-click on “Server” -> Register -> Server.
Step 2: Add the following details.
General tab
- Name: w3wiki
Connection tab
- Hostname/Address : <HOST>
- Port: 5432
- Maintenance database : <DATABASE>
- Username : <USER>
- Password: <PASSWORD>
SSL tab
Choose “require” from the dropdown.
Advanced tab
db restriction : <DATABASE>
Once you add a database to DB restriction, hit enter to create a database and click on save.
View database tables
- w3wiki(server name) –> Databases –> <DATABASE> –> Schemas –> Public –> Tables
- Right-click on the table you want to view and select “View/Edit Data”.
Finally, we have deployed the Django application on Heroku with Postgres Backend. Let’s test it now!
Deploying Django App on Heroku with Postgres as Backend
Django is a high-level Python web framework used to create web applications without any hassle, whereas, PostgreSQL is a powerful, open-source object-relational database. Let us first create a Django application with PostgreSQL in the backend and deploy it in Heroku which is a container-based cloud Platform to deploy, manage, and scale the applications.
Contact Us