[Django]-Heroku django app createsuperuser

88👍

do not detach the heroku shell:

heroku run python manage.py createsuperuser

worked for me

7👍

after wasting entire day i got the answer

heroku run python manage.py syncdb

doesn’t run on institute or office lan to run this you must remove system proxy as well

 unset http_proxy
`unset https_proxy`

I hope this will help

2👍

Try

heroku run python manage.py shell

And then create your superuser from there. Good luck!

1👍

More info please.
What DB are you using?
Have you set your local_settings.py?
Are you using Debian?

I use Postgres on Debian so I had to both apt-get install python-psycopg2 (otherwise you can’t use postgres) and pip install --user psycopg2 (otherwise pip freeze misses Postgres), then manually create a user and db. Replace USER with the username from your local_settings.py

sudo su - postgres
createuser USER -dPRs
createdb --owner USER  db.db

Leave a comment