- urlpatterns = patterns('',
- # ...
- ('^([^/]+)/([^/]+)/add/$', views.add_stage),
- # ...
- )
- def add_stage(request, app_label, model_name):
- if app_label == 'auth' and model_name == 'user':
- # do special-case code
- else:
- # do normal code
- urlpatterns = patterns('',
- # ...
- ('^auth/user/add/$', views.user_add_stage),
- ('^([^/]+)/([^/]+)/add/$', views.add_stage),
- # ...
- )
新闻热点
疑难解答