it rocks Tom!!

On Feb 16, 7:30 pm, Tom Evans <[email protected]> wrote:
> On Thu, Feb 16, 2012 at 4:00 PM, Evgenii Belykh <[email protected]> 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...
>
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to