force_text(toolbar.render_toolbar() + self.tag))
if response.get("Content-Length", None):
response["Content-Length"] = len(response.content)
del self.__class__.debug_toolbars[ident]
return response
After Change
new_response = panel.process_response(request, response)
if new_response:
response = new_response
for panel in reversed(toolbar.enabled_panels):
panel.disable_instrumentation()
if ("gzip" not in response.get("Content-Encoding", "") and
response.get("Content-Type", "").split("")[0] in _HTML_TYPES):
response.content = replace_insensitive(
force_text(response.content, encoding=settings.DEFAULT_CHARSET),