Django Heroku App崩溃无法找到" /"或" /favicon.ico"

时间:2015-11-12 04:20:37

标签: django heroku web-deployment

2015-11-12T04:16:38.270955+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=murmuring-wildwood-3859.herokuapp.com request_id=c58a387c-7577-46c4-890e-1d3a32d3691b fwd="128.237.130.131" dyno= connect= service= status=503 bytes=

2015-11-12T04:16:38.611269+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=murmuring-wildwood-3859.herokuapp.com request_id=fdd8e6ba-4637-4f8e-9d0f-67fef51e7820 fwd="128.237.130.131" dyno= connect= service= status=503 bytes=

我正在尝试部署我的django应用程序,但我的应用程序崩溃了。我很确定我的requirements.txt是正确的。

还有什么方法可以获得更详细的错误消息,而不仅仅是" app崩溃" ?

Procfile:

web: gunicorn webapps.wsgi --log-file -

requirements.txt:

altgraph==0.10.2
appnope==0.1.0
bdist-mpkg==0.5.0  
decorator==4.0.4
dj-database-url==0.3.0
dj-static==0.0.6
Django==1.8.6
django-haystack==2.4.1
django-toolbelt==0.0.1
elasticsearch==2.1.0
gnureadline==6.3.3
gunicorn==19.3.0
ipython==4.0.0
ipython-genutils==0.1.0
path.py==8.1.2
pbr==1.8.1
pexpect==4.0.1
pickleshare==0.5
Pillow==3.0.0
psycopg2==2.6.1
ptyprocess==0.5
py2app==0.7.3
pyOpenSSL==0.13.1
pyparsing==2.0.1
python-dateutil==1.5
pytz==2013.7
simplegeneric==0.8.1
six==1.10.0
static3==0.6.1
urllib3==1.12
virtualenv==13.1.2
virtualenv-clone==0.2.6
virtualenvwrapper==4.7.1
wheel==0.24.0
whitenoise==2.0.4

项目结构如下所示

root目录: PROJECTDIR APPDIR manage.py Procfile

appdir包含 模板 静态的 媒体 views.py/models.py等。

我认为我的问题是我需要配置settings.py和wsgi.py文件。

现在我在settings.py

中有这个
STATIC_URL = '/static/'
STATIC_ROOT = 'staticfiles'
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static'),
)
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'

这是我的wsgi.py

import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webapps.settings")
application = get_wsgi_application()
application = DjangoWhiteNoise(application)

0 个答案:

没有答案
相关问题