28

I deployed my django app and when I tried

heroku run python manage.py syncdb

I got a timeout awaiting process error. Superuser is not created for the system yet, though i did syncdb by using:

heroku run:detached python manage.py createsuperuser

But this does not prompt me for the superuser.

Port 5000 is not blocked in my system. How do I make heroku run work (or) how do I create the super user?

4

4 回答 4

79

不要分离 heroku shell:

heroku run python manage.py createsuperuser

为我工作

于 2015-06-06T03:12:46.867 回答
7

在浪费了一整天之后我得到了答案

heroku run python manage.py syncdb

不能在研究所或办公室局域网上运行以运行此您还必须删除系统代理

 unset http_proxy
`unset https_proxy`

我希望这个能帮上忙

于 2015-02-02T11:43:42.833 回答
2

尝试

heroku run python manage.py shell

然后从那里创建您的超级用户。祝你好运!

于 2014-02-28T06:04:15.487 回答
1

请提供更多信息。
你用的是什么数据库?
您是否设置了 local_settings.py?
你在使用 Debian 吗?

我在 Debian 上使用 Postgres,所以我必须同时使用apt-get install python-psycopg2(否则你不能使用 postgres)和pip install --user psycopg2(否则会pip freeze错过 Postgres),然后手动创建一个用户和数据库。将 USER 替换为 local_settings.py 中的用户名

sudo su - postgres
createuser USER -dPRs
createdb --owner USER  db.db
于 2014-03-17T22:38:34.420 回答