How do I run createsuperuser command in Django

rajasimonHOBBY

7 months ago

I tried to create a super user on Django by following this command but ended up getting the error.

railway link
railway environment
railway run python manage.py createsuperuser

0 Replies

7 months ago

locally you need to use the public host and port.


7 months ago

n/a


rajasimonHOBBY

7 months ago

Oh I thought runinng railway run python [manage.py](manage.py) createsuperuser uses the public host and port. So what you're saying is that I need to get the public url from the railway postgres then update my .env file to get it working?


7 months ago

nope, it uses whatever variables you have set on the linked service, you would need to overwrite that locally, a local env file should be sufficient