开发第一个template的问题
我照着老师的步骤做完后,浏览器下面输入127.0.0.1:8080/blog,显示了hello blog,但我加上127.0.0.1:8080/blog/index后,却返回了404,这是为什么呢?下面是错误展示
Page not found (404)
Request Method: | GET |
---|---|
Request URL: | http://127.0.0.1:8000/blog/index |
Using the URLconf defined in myblog.urls
,
Django tried these URL patterns, in this order:
admin/
blog
The current path, blog/index
, didn't match any of these.
You're seeing this error because you have DEBUG = True
in
your Django settings file. Change that to False
, and Django
will display a standard 404 page.