0
正在苦苦寻找用于heroku工作的procfile。试图学习如何让一个基本的Django网站启动并运行,并从头开始构建一些东西。我用我的电脑上的窗户来修补所有使用服务员的决定,但也许gunicorn会更容易?Heroku的Procfile无法正常工作 - 使用女服务员的Django
如果我不能解决这个问题,我只会使用一个来自heroku的模板,并从中构建,但我宁愿不要摆脱迄今为止所做的工作。
这是我的目录结构。
Root +---
.git
Include
Lib
Scripts
Scripts
Static
tcl
src +---
� db.sqlite3
� manage.py
�
+---alex1
� � forms.py
� � settings.py
� � urls.py
� � wsgi.py
� � __init__.py
� �
� +---__pycache__
� settings.cpython-36.pyc
� urls.cpython-36.pyc
� wsgi.cpython-36.pyc
� __init__.cpython-36.pyc
�
+---profiles
� admin.py
� apps.py
� forms.py
� models.py
� tests.py
� views.py
� __init__.py
�
+---migrations
� � 0001_initial.py
� � 0002_profile_description.py
� � 0003_auto_20170905_1654.py
� � 0004_auto_20170905_1659.py
� � __init__.py
� �
� +---__pycache__
� 0001_initial.cpython-36.pyc
� 0002_profile_description.cpython-36.pyc
� 0003_auto_20170905_1654.cpython-36.pyc
� 0004_auto_20170905_1659.cpython-36.pyc
� __init__.cpython-36.pyc
�
+---templates
� base.html
� contact.html
�
+---__pycache__
admin.cpython-36.pyc
forms.cpython-36.pyc
models.cpython-36.pyc
views.cpython-36.pyc
__init__.cpython-36.pyc
我收到的错误是这样
2017-10-08T09:33:38.547463+00:00 app[web.1]: There was an exception (ModuleNotFoundError) importing your module.
2017-10-08T09:33:38.547464+00:00 app[web.1]: It had these arguments:
2017-10-08T09:33:38.547464+00:00 app[web.1]: 1. No module named 'profiles'
这是我procfile。
web: waitress-serve --port=$PORT profiles.wsgi:application
谢谢大家 - 很欣赏你的帮助
这解决了我的问题!谢谢。如果我使用gunicorn,考虑到我正在从Windows开发,会不会很好?欢呼 –
哎呀!没错,你不能使用gunicorn ......你的选择是女服务员(这已经工作,所以我会保留它)或在Heroku中使用gunicorn和本地开发使用manage.py runserver –
好吧,所以我可以使用gunicorn,因为我没有在本地使用它?谢了哥们 –