簡體   English   中英

成功部署后,Django Heroku應用程序無法運行

[英]Django Heroku app doesn't run after successful deploy

在成功部署Django項目之后,我做了幾次嘗試在dyno上運行此應用程序的嘗試,但是,該應用程序掉了一些錯誤。 它在本地運行沒有問題。

ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
2018-10-06T19:08:44.455276+00:00 app[api]: Starting process with command `python manage.py migrate` by user tamerlanium@gmail.com
2018-10-06T19:08:51.519039+00:00 heroku[run.5633]: State changed from starting to up
2018-10-06T19:08:51.515345+00:00 heroku[run.5633]: Awaiting client
2018-10-06T19:08:51.578011+00:00 heroku[run.5633]: Starting process with command `python manage.py migrate`
2018-10-06T19:08:57.062762+00:00 heroku[run.5633]: State changed from up to complete
2018-10-06T19:08:57.046603+00:00 heroku[run.5633]: Process exited with status 1
2018-10-06T19:09:21.974583+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=tarlansblog.herokuapp.com request_id=b037e1d6-8a68-4992-8c4e-21462664ff0e fwd="176.107.221.177" dyno= connect= service= status=503 bytes= protocol=https
2018-10-06T19:09:23.424575+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=tarlansblog.herokuapp.com request_id=05d085e7-cf21-47a8-9752-1da68c0fa940 fwd="176.107.221.177" dyno= connect= service= status=503 bytes= protocol=https
2018-10-06T19:10:05.844413+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=tarlansblog.herokuapp.com request_id=9c64e68d-ba6c-422e-983c-9f9b30aac866 fwd="176.107.221.177" dyno= connect= service= status=503 bytes= protocol=https
2018-10-06T19:10:06.995437+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=tarlansblog.herokuapp.com request_id=9c9f6e8e-0233-4b3f-96c6-71882e4e17fe fwd="176.107.221.177" dyno= connect= service= status=503 bytes= protocol=https
2018-10-06T19:14:25.639377+00:00 app[api]: Starting process with command `python manage.py migrate` by user tamerlanium@gmail.com

我不確定,但是我會說您的靜態文件有問題。 當Heroku嘗試獲取它們時,您的狀態為503。 也許您應該嘗試查看如何在django項目中收集靜態文件。 該鏈接應幫助您解決此問題: https : //devcenter.heroku.com/articles/django-assets

祝好運!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM