2015-02-10 25 views
2

我一直在关注djangogirl的教程http://tutorial.djangogirls.org/en/deploy/README.html在Heroku上部署django应用。我是一个完整的新手,所以很多东西对我来说似乎都是黑魔法,我对发生的事情有一个非常模糊的概念。但是,我似乎已经能够从创建我的应用程序到将其推送到远程存储库并运行Web进程,从而使所有事情顺利进行。在heroku上部署django应用 - 在服务器上找不到请求的URL

>heroku create 
>git push heroku master 
>heroku ps:scale web=1 

当我打开后该应用程序的URL,我得到的错误页面,该教程称,预计因为我还没有填补了空数据库“此服务器上找不到请求的URL”。所以它说运行

>heroku run python manage.py migrate 
>heroku run python manage.py createsuperuser 

当我跑他们两个的命令似乎执行良好。我试着再次尝试运行manage.py migrate,但它只是说没有更多的迁移适用。我可以很好地登录到管理页面,但试图打开应用程序url本身仍然给我一个'请求的网址在该服务器上找不到'的错误页面,即使在我应用迁移后。

就像我说的,我是一个真正的新手,所以我迷失在我应该如何解决这个问题。我一直在按照教程一步一步,并不知道我出错的地方。非常感谢帮助。

编辑: 这里是从heroku info -s输出:

addons=heroku-postgresql:hobby-dev 
    archived_at= 
    buildpack_provided_description=Python 
    create_status=complete 
    created_at=2015/02/10 05:02:00 -0800 
    domain_name=aqiblog.herokuapp.com 
    dynos=1 
    git_url=https://git.heroku.com/aqiblog.git 
    id=33873439 
    name=aqiblog 
    owner_delinquent=false 
    owner_email=*** 
    owner_name=*** 
    region=us 
    released_at=2015/02/10 05:33:50 -0800 
    repo_migrate_status=complete 
    repo_size=9458 
    requested_stack= 
    slug_size=53579300 
    stack=cedar-14 
    updated_at=2015/02/10 06:04:30 -0800 
    web_url=https://aqiblog.herokuapp.com/ 
    workers=0 

这里是从heroku logs的输出。为了我的外行人似乎没有任何不寻常的:

2015-02-10T14:04:49.315067+00:00 heroku[router]: at=info method=GET path="/" hos 
t=aqiblog.herokuapp.com request_id=15e74a24-32e9-4a74-ab2f-696c63853b72 fwd="183 
.90.125.206" dyno=web.1 connect=1ms service=4ms status=404 bytes=267 
2015-02-10T14:06:59.516339+00:00 heroku[router]: at=info method=GET path="/" hos 
t=aqiblog.herokuapp.com request_id=12b8b705-4820-46c4-9195-a04740ad138a fwd="183 
.90.125.206" dyno=web.1 connect=6ms service=7ms status=404 bytes=267 
2015-02-10T14:20:16.661117+00:00 heroku[router]: at=info method=GET path="/" hos 
t=aqiblog.herokuapp.com request_id=599be313-368a-4f66-900f-a459ef42b9ff fwd="183 
.90.125.206" dyno=web.1 connect=1ms service=5ms status=404 bytes=267 
2015-02-10T14:30:13.477370+00:00 heroku[router]: at=info method=GET path="/admin 
/" host=aqiblog.herokuapp.com request_id=91f04bfd-e7b9-41a4-b905-4b7d26861cc5 fw 
d="183.90.125.206" dyno=web.1 connect=2ms service=43ms status=302 bytes=391 
2015-02-10T14:30:13.800060+00:00 heroku[router]: at=info method=GET path="/admin 
/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=301b7aee-0f48-432f-a 
9a9-6696b14fe6be fwd="183.90.125.206" dyno=web.1 connect=1ms service=55ms status 
=200 bytes=2368 
2015-02-10T14:30:14.193976+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=d04f60ed-eef6-4678-a 
3f0-e133b55df175 fwd="183.90.125.206" dyno=web.1 connect=1ms service=3ms status= 
304 bytes=136 
2015-02-10T14:30:14.463950+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/login.css" host=aqiblog.herokuapp.com request_id=35ba7b7f-8ca2-40e5- 
b274-5a33138a7478 fwd="183.90.125.206" dyno=web.1 connect=3ms service=6ms status 
=304 bytes=136 
2015-02-10T14:30:14.845040+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/nav-bg.gif" host=aqiblog.herokuapp.com request_id=6b9ba7e5-b520-46d2 
-ae47-776340e6eac4 fwd="183.90.125.206" dyno=web.1 connect=3ms service=4ms statu 
s=304 bytes=136 
2015-02-10T14:30:31.563636+00:00 heroku[router]: at=info method=POST path="/admi 
n/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=8cb9b343-f93d-4f14- 
9803-592614b17b2f fwd="183.90.125.206" dyno=web.1 connect=2ms service=132ms stat 
us=302 bytes=625 
2015-02-10T14:30:31.910829+00:00 heroku[router]: at=info method=GET path="/admin 
/" host=aqiblog.herokuapp.com request_id=12df9c3c-4b60-4446-9094-ef567912c19f fw 
d="183.90.125.206" dyno=web.1 connect=1ms service=68ms status=200 bytes=3837 
2015-02-10T14:30:32.260761+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/dashboard.css" host=aqiblog.herokuapp.com request_id=194ab120-f85f-4 
78f-bd05-2bd5b424177d fwd="183.90.125.206" dyno=web.1 connect=2ms service=4ms st 
atus=304 bytes=136 
2015-02-10T14:30:32.558809+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/icon_addlink.gif" host=aqiblog.herokuapp.com request_id=b1867188-e93 
5-42eb-a12e-3342d6b09fd2 fwd="183.90.125.206" dyno=web.1 connect=2ms service=3ms 
status=304 bytes=136 
2015-02-10T14:30:32.556672+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/default-bg.gif" host=aqiblog.herokuapp.com request_id=c9cd25cf-5bd9- 
49ca-acb8-78c14d1cdffd fwd="183.90.125.206" dyno=web.1 connect=2ms service=4ms s 
tatus=304 bytes=136 
2015-02-10T14:30:32.958179+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/icon_changelink.gif" host=aqiblog.herokuapp.com request_id=46672886- 
026d-4e44-bbda-0a46c738688f fwd="183.90.125.206" dyno=web.1 connect=3ms service= 
4ms status=304 bytes=136 
2015-02-10T14:30:37.016120+00:00 heroku[router]: at=info method=GET path="/admin 
/blog/post/" host=aqiblog.herokuapp.com request_id=024f5a16-2afa-46ae-901f-d9c95 
d7ffac8 fwd="183.90.125.206" dyno=web.1 connect=2ms service=89ms status=200 byte 
s=3466 
2015-02-10T14:30:37.392657+00:00 heroku[router]: at=info method=GET path="/admin 
/jsi18n/" host=aqiblog.herokuapp.com request_id=175746a8-6269-499c-9539-e94442df 
3740 fwd="183.90.125.206" dyno=web.1 connect=3ms service=45ms status=200 bytes=2 
551 
2015-02-10T14:30:37.353918+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/changelists.css" host=aqiblog.herokuapp.com request_id=4b1968b8-5977 
-49d2-92c7-7f8e6f83bcce fwd="183.90.125.206" dyno=web.1 connect=2ms service=5ms 
status=200 bytes=5523 
2015-02-10T14:30:37.353954+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/js/core.js" host=aqiblog.herokuapp.com request_id=2765ef40-cf94-4e80-af2 
3-df2bd41c29fd fwd="183.90.125.206" dyno=web.1 connect=1ms service=3ms status=20 
0 bytes=7182 
2015-02-10T14:30:37.664695+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/js/admin/RelatedObjectLookups.js" host=aqiblog.herokuapp.com request_id= 
ab90b0a5-c743-4a36-8cf8-a45bcdb26c10 fwd="183.90.125.206" dyno=web.1 connect=2ms 
service=3ms status=200 bytes=3515 
2015-02-10T14:30:37.676047+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/js/jquery.min.js" host=aqiblog.herokuapp.com request_id=d793e5e6-f05c-41 
7a-bc14-c726b217a873 fwd="183.90.125.206" dyno=web.1 connect=2ms service=11ms st 
atus=200 bytes=92913 
2015-02-10T14:30:37.672663+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/js/jquery.init.js" host=aqiblog.herokuapp.com request_id=7494223b-6a43-4 
861-93c6-8a902e8f0b1f fwd="183.90.125.206" dyno=web.1 connect=3ms service=3ms st 
atus=200 bytes=608 
2015-02-10T14:30:37.922666+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/js/actions.min.js" host=aqiblog.herokuapp.com request_id=4481557e-e808-4 
5c7-9948-2856409b9f9c fwd="183.90.125.206" dyno=web.1 connect=3ms service=4ms st 
atus=200 bytes=3320 
2015-02-10T14:30:39.773435+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/tooltag-add.png" host=aqiblog.herokuapp.com request_id=d1e06eca-e54e 
-44a4-b4c6-b834751c52b8 fwd="183.90.125.206" dyno=web.1 connect=3ms service=3ms 
status=200 bytes=371 
2015-02-10T14:30:39.795367+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/nav-bg-reverse.gif" host=aqiblog.herokuapp.com request_id=7df78871-e 
7a8-4a47-9260-7b1f715b2293 fwd="183.90.125.206" dyno=web.1 connect=2ms service=2 
ms status=304 bytes=136 
2015-02-10T14:30:43.715783+00:00 heroku[router]: at=info method=GET path="/admin 
/blog/" host=aqiblog.herokuapp.com request_id=c8c26fb6-7c06-424a-96a3-ed7d7acf52 
15 fwd="183.90.125.206" dyno=web.1 connect=2ms service=62ms status=200 bytes=260 
6 
2015-02-10T14:30:44.051139+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=a9525efc-ca5b-40a2-b 
79c-0d1c7ea8f323 fwd="183.90.125.206" dyno=web.1 connect=3ms service=2ms status= 
304 bytes=136 
2015-02-10T14:30:46.623963+00:00 heroku[router]: at=info method=GET path="/admin 
/" host=aqiblog.herokuapp.com request_id=6e2f037e-1156-4ecb-ab9a-c629746701bc fw 
d="183.90.125.206" dyno=web.1 connect=3ms service=67ms status=200 bytes=3837 
2015-02-10T14:33:37.383948+00:00 heroku[router]: at=info method=GET path="/admin 
/auth/user/" host=aqiblog.herokuapp.com request_id=2e7aca9b-bf1a-4bca-a64e-4958c 
50d2bc3 fwd="183.90.125.206" dyno=web.1 connect=1ms service=107ms status=200 byt 
es=6954 
2015-02-10T14:33:37.795450+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=427f5971-4d88-4876-b 
d34-3d61219d0ee0 fwd="183.90.125.206" dyno=web.1 connect=1ms service=3ms status= 
304 bytes=136 
2015-02-10T14:33:38.115038+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/changelists.css" host=aqiblog.herokuapp.com request_id=1011a5b1-f3e3 
-4ccd-bb79-decbb9f04bab fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms 
status=304 bytes=136 
2015-02-10T14:33:38.144837+00:00 heroku[router]: at=info method=GET path="/admin 
/jsi18n/" host=aqiblog.herokuapp.com request_id=713139f7-188f-4dbb-8c06-f187256f 
7f69 fwd="183.90.125.206" dyno=web.1 connect=1ms service=45ms status=200 bytes=2 
551 
2015-02-10T14:33:38.404063+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/js/jquery.init.js" host=aqiblog.herokuapp.com request_id=5135b182-dc2e-4 
a74-b8a2-5d6c0ab12db4 fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms st 
atus=304 bytes=136 
2015-02-10T14:33:38.400444+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/js/core.js" host=aqiblog.herokuapp.com request_id=de86c5af-1a29-430f-a65 
1-dc6cf1fd48bf fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms status=30 
4 bytes=136 
2015-02-10T14:33:38.415586+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/js/jquery.min.js" host=aqiblog.herokuapp.com request_id=19c89d3d-5d23-41 
09-979e-b8bb3f42199a fwd="183.90.125.206" dyno=web.1 connect=4ms service=2ms sta 
tus=304 bytes=136 
2015-02-10T14:33:38.408607+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/icon_searchbox.png" host=aqiblog.herokuapp.com request_id=c5a70735-1 
712-4040-9eb5-6b7dee13abd2 fwd="183.90.125.206" dyno=web.1 connect=0ms service=1 
ms status=200 bytes=620 
2015-02-10T14:33:38.406036+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/js/admin/RelatedObjectLookups.js" host=aqiblog.herokuapp.com request_id= 
893d6f5c-af8b-4532-8aa3-6934250950c4 fwd="183.90.125.206" dyno=web.1 connect=0ms 
service=2ms status=304 bytes=136 
2015-02-10T14:33:38.412860+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/js/actions.min.js" host=aqiblog.herokuapp.com request_id=2dcac6b1-bb61-4 
ccd-b2ec-25ecacf72228 fwd="183.90.125.206" dyno=web.1 connect=1ms service=4ms st 
atus=304 bytes=136 
2015-02-10T14:33:38.772975+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/changelist-bg.gif" host=aqiblog.herokuapp.com request_id=4e6c781c-37 
35-43f8-9e00-6b553737b3a6 fwd="183.90.125.206" dyno=web.1 connect=0ms service=1m 
s status=200 bytes=301 
2015-02-10T14:33:38.674202+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/icon-yes.gif" host=aqiblog.herokuapp.com request_id=e9851dfa-c05f-49 
09-a4c4-367907fb285c fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms sta 
tus=200 bytes=551 
2015-02-10T14:33:38.777309+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/nav-bg.gif" host=aqiblog.herokuapp.com request_id=e1f74192-01f4-4036 
-9a9d-79526979186a fwd="183.90.125.206" dyno=web.1 connect=0ms service=2ms statu 
s=304 bytes=136 
2015-02-10T14:33:38.790954+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/nav-bg-selected.gif" host=aqiblog.herokuapp.com request_id=1fa8c87c- 
67f7-473d-b783-bdff4120a7ce fwd="183.90.125.206" dyno=web.1 connect=2ms service= 
2ms status=200 bytes=517 
2015-02-10T14:33:38.784201+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/sorting-icons.gif" host=aqiblog.herokuapp.com request_id=c712ebb1-65 
e6-45ab-96b5-7a993386ce77 fwd="183.90.125.206" dyno=web.1 connect=0ms service=2m 
s status=200 bytes=621 
2015-02-10T14:33:43.504537+00:00 heroku[router]: at=info method=GET path="/admin 
/" host=aqiblog.herokuapp.com request_id=4de8523a-32a3-4038-baca-1da937d8bcc2 fw 
d="183.90.125.206" dyno=web.1 connect=1ms service=63ms status=200 bytes=3837 
2015-02-10T14:33:43.831076+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/dashboard.css" host=aqiblog.herokuapp.com request_id=e0bb91fd-3202-4 
003-adb3-c56c968cace9 fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms st 
atus=304 bytes=136 
2015-02-10T14:33:47.175588+00:00 heroku[router]: at=info method=GET path="/admin 
/logout/" host=aqiblog.herokuapp.com request_id=9262fa61-6ca5-471d-b640-267022e8 
51a7 fwd="183.90.125.206" dyno=web.1 connect=1ms service=76ms status=200 bytes=1 
695 
2015-02-10T14:33:54.172429+00:00 heroku[router]: at=info method=GET path="/" hos 
t=aqiblog.herokuapp.com request_id=8cf14925-254e-464e-9989-97663a447176 fwd="183 
.90.125.206" dyno=web.1 connect=0ms service=5ms status=404 bytes=267 
2015-02-10T14:57:48.546469+00:00 heroku[api]: Starting process with command `pyt 
hon manage.py migrate` by [email protected] 
2015-02-10T14:57:54.603274+00:00 heroku[run.5781]: Awaiting client 
2015-02-10T14:57:54.648369+00:00 heroku[run.5781]: Starting process with command 
`python manage.py migrate` 
2015-02-10T14:57:54.901926+00:00 heroku[run.5781]: State changed from starting t 
o up 
2015-02-10T14:57:57.659853+00:00 heroku[run.5781]: State changed from up to comp 
lete 
2015-02-10T14:57:57.650205+00:00 heroku[run.5781]: Process exited with status 0 
2015-02-10T15:35:07.305786+00:00 heroku[web.1]: Stopping all processes with SIGT 
ERM 
2015-02-10T15:35:08.786505+00:00 heroku[web.1]: Process exited with status 143 
2015-02-10T15:35:05.251964+00:00 heroku[web.1]: Idling 
2015-02-10T15:35:05.253030+00:00 heroku[web.1]: State changed from up to down 
2015-02-10T15:48:14.796557+00:00 heroku[web.1]: Unidling 
2015-02-10T15:48:20.976179+00:00 app[web.1]: serving on http://0.0.0.0:22300 
2015-02-10T15:48:14.800364+00:00 heroku[web.1]: State changed from down to start 
ing 
2015-02-10T15:48:19.187658+00:00 heroku[web.1]: Starting process with command `w 
aitress-serve --port=22300 mysite.wsgi:application` 
2015-02-10T15:48:21.486158+00:00 heroku[web.1]: State changed from starting to u 
p 
2015-02-10T15:48:31.912164+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=8db52772-ce7d-4c5d-a 
b49-07cbe01ebaf7 fwd="183.90.125.206" dyno=web.1 connect=1ms service=2ms status= 
200 bytes=14265 
2015-02-10T15:48:22.898514+00:00 heroku[router]: at=info method=GET path="/" hos 
t=aqiblog.herokuapp.com request_id=df78cf63-b28a-4986-947b-82b7229b6c22 fwd="183 
.90.125.206" dyno=web.1 connect=1ms service=22ms status=404 bytes=267 
2015-02-10T15:48:32.904690+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/login.css" host=aqiblog.herokuapp.com request_id=f01a7d1e-d3da-4ce2- 
a596-49c502c148a9 fwd="183.90.125.206" dyno=web.1 connect=6ms service=6ms status 
=200 bytes=1208 
2015-02-10T15:48:31.526354+00:00 heroku[router]: at=info method=GET path="/admin 
/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=28cd2f09-49fe-4327-a 
b6c-4fadd62b32db fwd="183.90.125.206" dyno=web.1 connect=2ms service=32ms status 
=200 bytes=2368 
2015-02-10T15:48:33.516041+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/nav-bg.gif" host=aqiblog.herokuapp.com request_id=ad4a834a-814a-4a95 
-926f-9356f0ee8939 fwd="183.90.125.206" dyno=web.1 connect=1ms service=3ms statu 
s=200 bytes=517 
2015-02-10T15:48:31.127574+00:00 heroku[router]: at=info method=GET path="/admin 
/" host=aqiblog.herokuapp.com request_id=1a5c7e5a-e4b7-4a9d-a141-df959928fe81 fw 
d="183.90.125.206" dyno=web.1 connect=1ms service=16ms status=302 bytes=390 
2015-02-10T15:49:01.840359+00:00 heroku[router]: at=info method=POST path="/admi 
n/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=4287d109-c80e-4e43- 
acc1-b047f63af3bc fwd="183.90.125.206" dyno=web.1 connect=2ms service=140ms stat 
us=200 bytes=2540 
2015-02-10T15:49:02.187422+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/icon_error.gif" host=aqiblog.herokuapp.com request_id=feb59db0-4c11- 
495b-80f2-a5923fc73c6f fwd="183.90.125.206" dyno=web.1 connect=2ms service=3ms s 
tatus=200 bytes=571 
2015-02-10T15:49:21.789377+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/nav-bg-reverse.gif" host=aqiblog.herokuapp.com request_id=36deb932-f 
4b7-433b-99dc-5926493a7c89 fwd="183.90.125.206" dyno=web.1 connect=2ms service=3 
ms status=200 bytes=430 
2015-02-10T15:49:22.319427+00:00 heroku[router]: at=info method=POST path="/admi 
n/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=5fdd060f-1513-4816- 
a6eb-203c999af731 fwd="183.90.125.206" dyno=web.1 connect=3ms service=134ms stat 
us=200 bytes=2540 
2015-02-10T15:49:56.826400+00:00 heroku[router]: at=info method=POST path="/admi 
n/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=f3d1e006-6e9c-436b- 
bf1a-c4d4f05532d4 fwd="183.90.125.206" dyno=web.1 connect=10ms service=187ms sta 
tus=200 bytes=2540 
2015-0 
2-10T15:49:57.955395+00:00 heroku[router]: at=info method=GET path="/static/admi 
n/css/login.css" host=aqiblog.herokuapp.com request_id=a918b235-0698-4ce4-80d0-a 
96d8dfc0610 fwd="183.90.125.206" dyno=web.1 connect=1ms service=6ms status=304 b 
ytes=136 
2015-02-10T15:49:59.906654+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=15773995-4c99-459a-9 
029-ee456371f894 fwd="183.90.125.206" dyno=web.1 connect=0ms service=1ms status= 
304 bytes=136 
2015-02-10T15:50:01.261517+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/icon_error.gif" host=aqiblog.herokuapp.com request_id=3b313279-e294- 
42c0-8aa5-f41debcb637e fwd="183.90.125.206" dyno=web.1 connect=4ms service=5ms s 
tatus=304 bytes=136 
2015-02-10T15:50:05.242912+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/nav-bg.gif" host=aqiblog.herokuapp.com request_id=6a0162e3-ec3b-445c 
-b8df-82d5ac6febb2 fwd="183.90.125.206" dyno=web.1 connect=1ms service=2ms statu 
s=304 bytes=136 
2015-02-10T15:57:25.175840+00:00 heroku[router]: at=info method=GET path="/" hos 
t=aqiblog.herokuapp.com request_id=0d15d2cb-81e6-4482-bb62-b6182a994ad7 fwd="183 
.90.125.206" dyno=web.1 connect=1ms service=5ms status=404 bytes=267 
2015-02-10T15:59:35.740276+00:00 heroku[router]: at=info method=GET path="/" hos 
t=aqiblog.herokuapp.com request_id=7b4581c2-94d7-4835-a46c-632690169036 fwd="180 
.255.248.125" dyno=web.1 connect=1ms service=5ms status=404 bytes=267 
2015-02-10T15:59:36.759656+00:00 heroku[router]: at=info method=GET path="/favic 
on.ico" host=aqiblog.herokuapp.com request_id=2f3cc9e1-c086-4725-b9ab-1ec6973c41 
16 fwd="180.255.248.125" dyno=web.1 connect=1ms service=5ms status=404 bytes=278 

2015-02-10T17:00:33.167613+00:00 heroku[web.1]: Idling 
2015-02-10T17:00:33.168670+00:00 heroku[web.1]: State changed from up to down 
2015-02-10T17:00:36.185466+00:00 heroku[web.1]: Stopping all processes with SIGT 
ERM 
2015-02-10T17:00:37.952348+00:00 heroku[web.1]: Process exited with status 143 
2015-02-10T17:34:28.848841+00:00 heroku[web.1]: Unidling 
2015-02-10T17:34:28.849165+00:00 heroku[web.1]: State changed from down to start 
ing 
2015-02-10T17:34:36.106173+00:00 heroku[web.1]: Starting process with command `w 
aitress-serve --port=31126 mysite.wsgi:application` 
2015-02-10T17:34:38.613422+00:00 app[web.1]: serving on http://0.0.0.0:31126 
2015-02-10T17:34:39.197559+00:00 heroku[web.1]: State changed from starting to u 
p 
2015-02-10T17:34:40.974208+00:00 heroku[router]: at=info method=GET path="/admin 
" host=aqiblog.herokuapp.com request_id=42a56ba0-c220-4c9c-916f-0eede44bfee9 fwd 
="79.199.237.241" dyno=web.1 connect=3ms service=22ms status=301 bytes=257 
2015-02-10T17:34:41.125316+00:00 heroku[router]: at=info method=GET path="/admin 
/" host=aqiblog.herokuapp.com request_id=3388a9c4-f5ee-40a5-9ac8-a05d7568854e fw 
d="79.199.237.241" dyno=web.1 connect=3ms service=20ms status=302 bytes=390 
2015-02-10T17:34:41.293835+00:00 heroku[router]: at=info method=GET path="/admin 
/login/?next=/admin/" host=aqiblog.herokuapp.com request_id=3ae35f86-8510-4cf3-a 
0e5-f2a0ce41248b fwd="79.199.237.241" dyno=web.1 connect=2ms service=43ms status 
=200 bytes=2368 
2015-02-10T17:34:41.985024+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/base.css" host=aqiblog.herokuapp.com request_id=19153867-5c26-41ca-a 
8aa-d62e8094a02b fwd="79.199.237.241" dyno=web.1 connect=3ms service=5ms status= 
200 bytes=14265 
2015-02-10T17:34:42.139780+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/css/login.css" host=aqiblog.herokuapp.com request_id=7b798b7b-7850-43b4- 
927b-2343eacc5582 fwd="79.199.237.241" dyno=web.1 connect=5ms service=5ms status 
=200 bytes=1208 
2015-02-10T17:34:43.024133+00:00 heroku[router]: at=info method=GET path="/stati 
c/admin/img/nav-bg.gif" host=aqiblog.herokuapp.com request_id=20fa5217-01eb-4615 
-bd4f-b53aaee0421c fwd="79.199.237.241" dyno=web.1 connect=3ms service=5ms statu 
s=200 bytes=517 
2015-02-10T17:34:44.289787+00:00 heroku[router]: at=info method=GET path="/favic 
on.ico" host=aqiblog.herokuapp.com request_id=4bfc9795-d61c-402c-afd5-08bfe0564b 
38 fwd="79.199.237.241" dyno=web.1 connect=4ms service=11ms status=404 bytes=278 

2015-02-10T17:34:44.446558+00:00 heroku[router]: at=info method=GET path="/favic 
on.ico" host=aqiblog.herokuapp.com request_id=131a1b9d-cac0-4410-ae02-0ab562e6b2 
2b fwd="79.199.237.241" dyno=web.1 connect=2ms service=7ms status=404 bytes=278 
2015-02-10T17:35:08.338710+00:00 heroku[router]: at=info method=GET path="/" hos 
t=aqiblog.herokuapp.com request_id=4fd6af83-32f4-4ba2-8117-1e0914ac8882 fwd="79. 
199.237.241" dyno=web.1 connect=4ms service=9ms status=404 bytes=267 
2015-02-10T18:41:59.962983+00:00 heroku[web.1]: Idling 
2015-02-10T18:41:59.963483+00:00 heroku[web.1]: State changed from up to down 
2015-02-10T18:42:04.360383+00:00 heroku[web.1]: Stopping all processes with SIGT 
ERM 
2015-02-10T18:42:06.591219+00:00 heroku[web.1]: Process exited with status 143 

另外,我使用的是Windows 8,我还是刚开始使用命令行的工作,因此,如果这需要任何命令行疑难解答我”如果你能给我Windows命令,我会非常感激(尽管如果你给我Unix命令,我很乐意搜索Windows等价物)

+0

欢迎来到StackOverflow。好的第一个问题 - 你已经把你所尝试的内容,错误是什么以及试图解决这个问题。希望有人熟悉Heroku能给你一个正确方向的提示。 – 2015-02-10 15:05:33

+0

当你看到这条消息时,你会去哪个URL?你能给出更多的错误细节:它是一个Django错误页面,你能粘贴完整的错误吗? – 2015-02-10 15:14:34

+0

嗨,网址是aqiblog.herokuapp.com。这给出了'请求的网址未找到页',但aqiblog.herokuapp.com/admin/加载正常,我可以登录罚款 – user141554 2015-02-10 15:58:46

回答

0

不知何故,我似乎设法解决它,虽然我不知道确切的问题是什么。我所做的第一个改变是添加了行

psybopg2==2.5.4 
在requirements.txt文件

,该教程说是必需的,但我好像错过了(唉)。但即使在部署更新后的存储库后,我仍然得到了同样的'URL not found'错误页面。我认为不会影响任何东西的下一次更改(由绝望决定),是在mysite \ settings.py文件的某些赋值语句的'='符号之间添加空格。部署后,仍然没有运气。

我决定在这一点继续教程和稍后解决这个问题,所以我调整并创建了一些不应该影响部署过程的文件(编辑mysite \ urls.py,blog \ views.py,创建blog \ urls.py和一个html模板文件,post_list.html)。然后我意识到,我已经跟着教程把

python-3.4.2 

在runtime.txt文件,但我是在本地运行的python-3.4.1,所以我改变了指定的版本号。这次在部署之后,我得到了一个服务器错误(500),但我怀疑我在指定mysite \ view.py中定义的视图所呈现的模板的路径中放置的反斜杠(即blog \ post_list .html),以便网站在本地运行(在Windows上)没有错误。用正斜杠(blog/post_list.html)替换并再次部署,它奇迹般地工作!

所以我怀疑是改变python运行时是什么解决了这个问题,但是再一次,为什么呢?如果未指定它,Heroku是否默认使用Python 2.7.9,以及本地版本的python如何影响服务器上文件的运行?

0

你能否确认你正在访问的URL等同于运行以下命令时输出的URL :

heroku info -s | grep web_url | cut -d= -f2 

另外,如果你运行以下内容,你发现什么与众不同吗?

heroku logs 
+0

嗯,我忘了补充一点,我在Windows系统上工作,所以我不确定第一个命令有效(当然,grep和cut不起作用)。但我试过运行'heroku info -s -a eon-testing',我得到了'!您无法访问应用程序测试。我一直试图理解'-a eon-testing'部分的作用,但帮助文件没有指定超出-s的任何参数。无论如何,我已经在一个编辑中发布了'heroku logs'和'heroku info -s'输出。 web_url对应于我正在尝试访问的网址。 – user141554 2015-02-11 01:55:37

+0

哎呀,那是我的错,对不起。我已经将'-a eon-testing'包括在本地测试它的应用程序中,以确保我告诉你正确的事情,并忘记告诉你将其删除。 '-a'选项允许你指定一个应用程序,但对你来说是不必要的,因为你只有一个。你能用'heroku run python manage.py migrate'的输出来编辑你的问题吗? – jimjkelly 2015-02-11 11:21:57

+0

也许''heroku运行“python manage.py migrate --list”'。请注意关于在heroku上运行的命令的引号 - 它告诉它输出它已经/可以运行的迁移列表。 – jimjkelly 2015-02-11 11:25:57

相关问题