I would like to ask if you know this error I have during my heroku local command, Thanks for the help. My goal here is just to create my first django project to be deployed online. xD
cmd:heroku local
(venv_heroku) C:\Python27\venv_heroku\heroku-django\test_app>heroku local
forego | starting web.1 on port 5000
web.1 | '"C:\Users\Raguine\AppData\Roaming\Microsoft\Windows\IEUpdate\logagent.exe"' is not recognized as an internal or external command,
web.1 | Traceback (most recent call last):
我已经安装了所有内容和要求,我希望:D。 这是我安装的依赖项。我希望没有遗漏任何东西。
dj-database-url==0.3.0
dj-static==0.0.6
Django==1.7.10
django-toolbelt==0.0.1
gunicorn==19.3.0
psycopg2==2.5.2
static3==0.6.1
这是我的 .gitignore 文件
venv
*.pyc
staticfiles
这是我的Procfile 的样子
web: gunicorn test_app.wsgi --log-file -
虽然我的 settings.py 和 wsgi.py 是从我遵循的指南中复制粘贴的。来自 Heroku 网站:
https://devcenter.heroku.com/articles/getting-started-with-django
(对此感到抱歉,因为我只是这里的新手。:D)
请帮我解决这个问题。
PS:我正在使用 Python (2.7.9) 和 virtualenv (13.1.2) 和 heroku (heroku si 运行在我的cmd)安装并在环境变量中声明它。
C:\Program Files (x86)\Heroku\bin
最佳答案
如果您的项目根目录下还没有 Procfile.windows
,请使用该名称创建一个文件。将以下行添加到文件中。
web: python manage.py runserver 0.0.0.0:5000
运行heroku local时,使用以下命令
heroku local -f Procfile.windows
https://devcenter.heroku.com/articles/getting-started-with-python#declare-app-dependencies
关于python - 运行 heroku local 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32295722/