1.环境win7,Django版本(1, 7, 1, 'final', 0),Python版本2.7
2.问题
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
^admin/
^hello/$
The current URL, , didn't match any of these.
3.没有运行任何程序是,显示IT workS!的。我的views.py程序:
from django.http import HttpResponse
def hello(request):
return HttpResponse("hello world!")
4.我的urls.py
from django.conf.urls import patterns,include,url
from django.contrib import admin
urlpatterns = patterns('',
('^hello/$', 'hello'),
# Examples:
# url(r'^$', 'mysite.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)