panel.process_view(request, view_func, view_args, view_kwargs)
def process_response(self, request, response):
if request not in self.debug_toolbars:
return response
if self.debug_toolbars[request].config["INTERCEPT_REDIRECTS"]:
if isinstance(response, HttpResponseRedirect):
redirect_to = response.get("Location", None)
if redirect_to:
After Change
ident = thread.get_ident()
toolbar = self.debug_toolbars.get(ident)
if not toolbar:
return
if toolbar.config["INTERCEPT_REDIRECTS"]:
if isinstance(response, HttpResponseRedirect):
redirect_to = response.get("Location", None)
if redirect_to: