Django Heroku hellodjango坠机事件
我正在尝试将Django项目上载到Heroku如果我克隆hellodjango项目,则会出现以下错误: Heroku代码:Django Heroku hellodjango坠机事件,django,deployment,heroku,Django,Deployment,Heroku,我正在尝试将Django项目上载到Heroku如果我克隆hellodjango项目,则会出现以下错误: Heroku代码: git clone git://github.com/heroku/python-django-sample.git cd python-django-sample heroku create git push heroku master heroku open 是否需要在settings.py中更改某些内容?我尝试了一个NodeJS示例,效果很好,但django没有
git clone git://github.com/heroku/python-django-sample.git
cd python-django-sample
heroku create
git push heroku master
heroku open
是否需要在settings.py中更改某些内容?我尝试了一个NodeJS示例,效果很好,但django没有
谢谢。您错过了一些步骤;但是,与其在这里把它们打印出来,我想让您参考包含所有这些详细步骤的 小结如下:
heroku
命令工作django工具带
,这是一个Python虚拟包,安装在heroku上运行django的所有要求pip freeze>requirements.txt
(注意,它应该被称为requirements.txt
)settings.py中设置DATABASES['default']=dj\u database\u url.config()
heroku create
(在heroku中创建一个新的应用程序,并向您的git存储库中添加一个远程应用程序)使用heroku进行设置,然后运行git push heroku master
,将您的文件发送到各个存储库heroku ps:scale web=1执行此操作(这将启动一个web worker),然后使用heroku open
浏览应用程序
你错过了几步;但是,与其在这里把它们打印出来,我想让您参考包含所有这些详细步骤的 小结如下:
heroku
命令工作django工具带
,这是一个Python虚拟包,安装在heroku上运行django的所有要求pip freeze>requirements.txt
(注意,它应该被称为requirements.txt
)settings.py中设置DATABASES['default']=dj\u database\u url.config()
heroku create
(在heroku中创建一个新的应用程序,并向您的git存储库中添加一个远程应用程序)使用heroku进行设置,然后运行git push heroku master
,将您的文件发送到各个存储库heroku ps:scale web=1执行此操作(这将启动一个web worker),然后使用heroku open
浏览应用程序
能否在本地运行项目(python manage.py runserver)?我在Heroku上也遇到了同样的问题,然后我尝试在我的本地Web服务器上运行该应用程序,结果收到了错误消息。我一摆脱它们并更新了requirements.txt,Heroku就能够执行该应用程序了。您能在本地运行该项目吗(python manage.py runserver)?我在Heroku上也遇到了同样的问题,然后我尝试在我的本地Web服务器上运行该应用程序,结果收到了错误消息。一旦我摆脱了它们并更新了requirements.txt,Heroku就能够执行该应用程序了。是的,我之前也尝试过,当我检查dyno的状态时,我得到了:===web(1X):
gunicorn hellodjango.wsgi
web.1:崩溃2013/08/13 01:52:05(~28秒前)我在settings.py的底部使用它:import dj_database_url DATABASES={'default':dj_database_url.config(default='postgres://localhost“)}是的,我在检查我得到的dyno的状态之前和之后也尝试过这个:===web(1X):gunicorn hellodjango.wsgi
web.1:Crash 2013/08/13 01:52:05(~28秒前)我在settings.py的底部使用它:import dj_database_url DATABASES={'default':dj_database_url.config(default='postgres://localhost')}