PageRenderTime 222ms CodeModel.GetById 120ms app.highlight 1ms RepoModel.GetById 100ms app.codeStats 0ms

/tests/regressiontests/urlpatterns_reverse/middleware.py

https://code.google.com/p/mango-py/
Python | 11 lines | 8 code | 3 blank | 0 comment | 0 complexity | 19b9824d570ac0ef457f898cdf73e93e MD5 | raw file
 1from django.core.urlresolvers import set_urlconf
 2
 3import urlconf_inner
 4
 5class ChangeURLconfMiddleware(object):
 6    def process_request(self, request):
 7        request.urlconf = urlconf_inner.__name__
 8
 9class NullChangeURLconfMiddleware(object):
10    def process_request(self, request):
11        request.urlconf = None