【发布时间】:2014-12-13 16:34:37
【问题描述】:
我正在关注 youtube 教程,但遇到错误...
遇到错误
The requested URL /hello was not found on this server.
网站/urls.py
urlpatterns = patterns('',
url(r'^hello/$', article.views.hello),
...
)
文章/views.py
from django.shortcuts import render
from django.http import HttpResponse
def hello(request):
name = 'mike'
html = '<html><body> sup %s </body></html> ' %name
return HttpRequest(html)
网站/settings.py
INSTALLED_APPS = (
...
'article',
)
【问题讨论】:
标签: python regex django django-urls