How do I run createsuperuser command in Django

rajasimon
HOBBY

10 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

10 months ago

locally you need to use the public host and port.


10 months ago

n/a


rajasimon
HOBBY

10 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?


10 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