我正在跟随Youtube教程学习,在操作过程中遇到一个错误...。
遇到一个错误。
遇到一个错误。
The requested URL /hello was not found on this server.
site/urls.py
urlpatterns = patterns('',
url(r'^hello/$', article.views.hello),
...
)
article/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)
site/settings.py
INSTALLED_APPS = (
...
'article',
)