【发布时间】:2012-05-22 17:42:42
【问题描述】:
所以我正在关注 heroku 和 django 的入门指南。但是,当我运行此命令时:
heroku run python manage.py syncdb
我收到此错误
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
我认为这意味着数据库尚未设置...所以我也手动添加了 shared_db 选项:
heroku addons:add shared-database:5mb
但是.. 我仍然遇到同样的错误。什么给了?
【问题讨论】:
-
如果这是一般问题或特定于 Django,您可以尝试使用简单的脚本进行手动连接吗?
-
遇到同样的问题,请问你最后解决了吗?
标签: python django postgresql deployment heroku