Heruko Django应用程序错误 - 网站未加载

时间:2018-04-10 10:10:39

标签: django heroku django-models hosting wsgi

嘿伙计们我创建了我的第一个django网站!我想通过Heroku上传它,所以我按照他们对我说的一切,我仍然得到应用程序错误,当我尝试heruko打开我得到一个应用程序错误,因为我是初学者heruko我很沮丧得到错误!我发现我在这里得到错误,而我做git push heruko master我得到所有准备就绪,但部署完成后出现一个小错误,错误是:

Counting objects: 30, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (30/30), done.
Writing objects: 100% (30/30), 13.62 KiB | 422.00 KiB/s, done.
Total 30 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote:
remote: -----> $ python manage.py collectstatic --noinput
remote:        118 static files copied to 
    '/tmp/build_d2ad5fb0675c6c8305a3ad0fb5
819fe4/static', 131 post-processed.
remote:
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)
remote:
remote: -----> Compressing...
remote:        Done: 54.3M
remote: -----> Launching...
remote:        Released v9
remote:        https://kiran-portfolio.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/kiran-portfolio.git
    dd0eec5..f9d7b19  master -> master
error: update_ref failed for ref 'refs/remotes/heroku/master': cannot lock 
ref '
refs/remotes/heroku/master': unable to resolve reference 
    'refs/remotes/heroku/ma
ster': reference broken

我还认为错误在于Procfile,因为我不知道我们应该在wsgi.py中输入什么名称,如下所示:

web: guincorn whatnameshouldiwrite.wsgi

我发现我们应该编写我们的应用程序名称,但我的项目中有两个应用程序,我的heroku网站有不同的名称,我的PC上的项目名称不同,所以我应该在那里写下哪个名字?

heroku日志看起来像:

    2018-04-10T08:14:54.924974+00:00 app[api]: Enable Logplex by user smschavan143@g
mail.com
2018-04-10T08:14:54.924974+00:00 app[api]: Release v2 created by user smschavan1
43@gmail.com
2018-04-10T08:14:54.816584+00:00 app[api]: Release v1 created by user smschavan1
43@gmail.com
2018-04-10T08:14:54.816584+00:00 app[api]: Initial release by user smschavan143@
gmail.com
2018-04-10T08:15:27.492135+00:00 heroku[router]: at=info code=H81 desc="Blank ap
p" method=GET path="/" host=kiran-portfolio.herokuapp.com request_id=fc6bbee0-4c
46-4896-b597-07c430591135 fwd="45.117.31.196" dyno= connect= service= status=502
 bytes= protocol=https
2018-04-10T08:15:31.386132+00:00 heroku[router]: at=info code=H81 desc="Blank ap
p" method=GET path="/favicon.ico" host=kiran-portfolio.herokuapp.com request_id=
daa19840-978e-46f1-9e69-4c031feecdcb fwd="45.117.31.196" dyno= connect= service=
 status=502 bytes= protocol=https
2018-04-10T08:28:39.000000+00:00 app[api]: Build started by user smschavan143@gm
ail.com
2018-04-10T08:28:39.000000+00:00 app[api]: Build failed -- check your build logs

2018-04-10T08:29:48.000000+00:00 app[api]: Build started by user smschavan143@gm
ail.com
2018-04-10T08:29:48.000000+00:00 app[api]: Build failed -- check your build logs

2018-04-10T08:30:26.000000+00:00 app[api]: Build started by user smschavan143@gm
ail.com
2018-04-10T08:30:26.000000+00:00 app[api]: Build failed -- check your build logs

2018-04-10T08:31:52.000000+00:00 app[api]: Build started by user smschavan143@gm
ail.com
2018-04-10T08:31:52.000000+00:00 app[api]: Build failed -- check your build logs

2018-04-10T08:34:55.000000+00:00 app[api]: Build started by user smschavan143@gm
ail.com
2018-04-10T08:34:55.000000+00:00 app[api]: Build failed -- check your build logs

2018-04-10T08:41:23.000000+00:00 app[api]: Build started by user smschavan143@gm
ail.com
2018-04-10T08:41:50.953604+00:00 app[api]: Attach DATABASE (@ref:postgresql-aero
dynamic-33012) by user smschavan143@gmail.com
2018-04-10T08:41:50.953604+00:00 app[api]: Release v3 created by user smschavan1
43@gmail.com
2018-04-10T08:41:51.193509+00:00 app[api]: Deploy 76360db4 by user smschavan143@
gmail.com
2018-04-10T08:41:51.193509+00:00 app[api]: Release v4 created by user smschavan1
43@gmail.com
2018-04-10T08:41:23.000000+00:00 app[api]: Build succeeded
2018-04-10T08:51:00.000000+00:00 app[api]: Build started by user smschavan143@gm
ail.com
2018-04-10T08:51:00.000000+00:00 app[api]: Build failed -- check your build logs

2018-04-10T08:52:35.000000+00:00 app[api]: Build started by user smschavan143@gm
ail.com
2018-04-10T08:53:00.830250+00:00 app[api]: Deploy 3885895d by user smschavan143@
gmail.com
2018-04-10T08:53:00.830250+00:00 app[api]: Release v5 created by user smschavan1
43@gmail.com
2018-04-10T08:52:35.000000+00:00 app[api]: Build succeeded
2018-04-10T08:59:46.000000+00:00 app[api]: Build started by user smschavan143@gm
ail.com
2018-04-10T09:00:10.571878+00:00 app[api]: Release v6 created by user smschavan1
43@gmail.com
2018-04-10T09:00:10.571878+00:00 app[api]: Deploy bbae6e49 by user smschavan143@
gmail.com
2018-04-10T08:59:46.000000+00:00 app[api]: Build succeeded
2018-04-10T09:00:48.993535+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/" host=kiran-portfolio.herokuapp.com reques
t_id=c3052a19-a59a-4cef-8265-4703bd1557ea fwd="45.117.31.196" dyno= connect= ser
vice= status=503 bytes= protocol=https
2018-04-10T09:00:52.766072+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/favicon.ico" host=kiran-portfolio.herokuapp
.com request_id=19bda5bc-fcc4-4bb8-9f14-2f4d52a2b0e0 fwd="45.117.31.196" dyno= c
onnect= service= status=503 bytes= protocol=https
2018-04-10T09:08:35.655039+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/" host=kiran-portfolio.herokuapp.com reques
t_id=5e69f860-dc72-4af3-9040-b1f0ae8af8e4 fwd="45.117.31.196" dyno= connect= ser
vice= status=503 bytes= protocol=https
2018-04-10T09:08:39.157957+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/favicon.ico" host=kiran-portfolio.herokuapp
.com request_id=2b372932-2ce2-4d45-9cdd-4f59b4422d76 fwd="45.117.31.196" dyno= c
onnect= service= status=503 bytes= protocol=https
2018-04-10T09:09:45.451328+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/" host=kiran-portfolio.herokuapp.com reques
t_id=d4de5c0a-c590-4b14-adc0-739cbe859feb fwd="45.117.31.196" dyno= connect= ser
vice= status=503 bytes= protocol=https
2018-04-10T09:09:52.145707+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/favicon.ico" host=kiran-portfolio.herokuapp
.com request_id=1392d710-b0b4-4a77-a01e-735041d98433 fwd="45.117.31.196" dyno= c
onnect= service= status=503 bytes= protocol=https
2018-04-10T09:10:00.000000+00:00 app[api]: Build started by user smschavan143@gm
ail.com
2018-04-10T09:10:26.434601+00:00 app[api]: Deploy 9d697adf by user smschavan143@
gmail.com
2018-04-10T09:10:26.434601+00:00 app[api]: Release v7 created by user smschavan1
43@gmail.com
2018-04-10T09:10:00.000000+00:00 app[api]: Build succeeded
2018-04-10T09:10:47.723358+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/" host=kiran-portfolio.herokuapp.com reques
t_id=b0f6be6e-393e-4416-b4d3-edb759292fa6 fwd="45.117.31.196" dyno= connect= ser
vice= status=503 bytes= protocol=https
2018-04-10T09:10:51.163961+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/favicon.ico" host=kiran-portfolio.herokuapp
.com request_id=cf906ebf-a5b9-42d3-98d7-0df7229e3d1e fwd="45.117.31.196" dyno= c
onnect= service= status=503 bytes= protocol=https
2018-04-10T09:10:56.992860+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/" host=kiran-portfolio.herokuapp.com reques
t_id=ce6d8b95-7508-4e1e-8610-684369b3e0cd fwd="45.117.31.196" dyno= connect= ser
vice= status=503 bytes= protocol=https
2018-04-10T09:10:58.488848+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/favicon.ico" host=kiran-portfolio.herokuapp
.com request_id=9e1727a7-806d-490d-94ee-8a779beb21a8 fwd="45.117.31.196" dyno= c
onnect= service= status=503 bytes= protocol=https

谢谢,

1 个答案:

答案 0 :(得分:0)

名称应位于wsgi.py文件所在的目录中。因此yourproj.wsgi指向模块中的wsgi文件。

此外,您不应该在部署时出现该引用错误,因此请更好地检查您的远程设置。