GCT1015
流线型化(streamlinling)函数导入1:直接导入视图函数 from django.conf.urls.defaults import * from mysite.views import hello urlpatterns = patterns('', (r'^hello/$', hello), (r'^time/$', time), )2:导入包函模块名和函数的客串,而不是函数本身 from django.conf.urls.defaults import * from mysite import views urlpatterns = patterns('', (r'^hello/$', 'views.hello'), (r'^time/$', 'views.time'),