On Thu, Feb 16, 2012 at 4:00 PM, Evgenii Belykh <djangost...@gmail.com> wrote: > Hi folks! > > I've trying to use sharing db via technique proposed by Dustin at > […] > def process_view(self, request, view_func, args, kwargs): > if request.path.startswith('/admin'): > request_cfg.admin = True > > def process_response(self, request, response): > if hasattr(request_cfg, 'admin'): > del request_cfg.admin >[…] > ------------------------------------------------- > Any help much appreciated. > PS.Maybe smth wrong in RouterMiddleware since it does not return a > response? >
Asked and answered yourself! Yes, that is exactly why it is failing. process_response(), if it exists, must always return a response. See: https://docs.djangoproject.com/en/1.3/topics/http/middleware/#process-response Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.