- from django.conf.urls.defaults import *
- urlpatterns = patterns('',
- (r'^hello/$', 'mysite.views.hello'),
- (r'^time/$', 'mysite.views.current_datetime'),
- (r'^time/plus/(/d{1,2})/$', 'mysite.views.hours_ahead'),
- (r'^tag/(/w+)/$', 'weblog.views.tag'),
- )
- from django.conf.urls.defaults import *
- urlpatterns = patterns('mysite.views',
- (r'^hello/$', 'hello'),
- (r'^time/$', 'current_datetime'),
- (r'^time/plus/(/d{1,2})/$', 'hours_ahead'),
- )
- urlpatterns += patterns('weblog.views',
- (r'^tag/(/w+)/$', 'tag'),
- )
新闻热点
疑难解答