Make sure you have created the PostgreSQL database service on Railway, specified the DATABASE_URL properly in the .env file, and setup dj-database-url for smooth working of the database operations.
Also you could try an alternative way instead of installing and setting up the dj-database-url:
Thank you for reading and giving feedback,
Make sure you have created the PostgreSQL database service on Railway, specified the
DATABASE_URL
properly in the.env
file, and setupdj-database-url
for smooth working of the database operations.Also you could try an alternative way instead of installing and setting up the dj-database-url:
Let's say my database url is given by railway as:
This is of the format,
So, we can convert this URL into a object like representation of the remote database in django settings.
Try these few things out and let me if it still doesn't works.
tnks this worked but now i'm getting a different err
The address of the hostname must be taken from the URL and don't use
Localhost
.