0
我似乎无法获得教程https://docs.djangoproject.com/en/1.6/intro/tutorial03/的工作。Django:无法找到index.html网址(Django民意调查教程)
urlpatterns = patterns('',
url(r'^polls/', include('polls.urls')),
url(r'^admin/', include(admin.site.urls)),
)
和index.html在/调查/模板/调查/:试图访问http://127.0.0.1:8000/index.html或http://127.0.0.1:8000/
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/index.html
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
^polls/
^admin/
The current URL, index.html, didn't match any of these.
我/mysite/urls.py集时,我得到以下错误index.html
有关如何通过Django解析url的更多信息,请参见https://docs.djangoproject.com/en/dev/topics/http/urls/。在Django中,url指向_view函数_而不是文件。 _urlconf_(在你的'urls.py'中)定义了url和view函数之间的映射关系 – Anentropic