看下这个 URLconf:
from django.conf.urls.defaults import *
from mysite.views import hello, current_datetime, hours_ahead
urlpatterns = patterns('',
(r'^hello/$', hello),
(r'^time/$', current_datetime),
(r'^time/plus/(\d{1,2})/$', hours_ahead),
)
在 URLconf 中的每一个入口包括了它所关联的视图函数,直接传入了一个函数对象。 这就意味着需要在