@@ -49,8 +49,6 @@ def __call__(self, request):
49
49
50
50
toolbar = DebugToolbar (request , self .get_response )
51
51
52
- self .configure_toolbar (request , toolbar )
53
-
54
52
# Activate instrumentation ie. monkey-patch.
55
53
for panel in toolbar .enabled_panels :
56
54
panel .enable_instrumentation ()
@@ -85,17 +83,6 @@ def __call__(self, request):
85
83
):
86
84
return response
87
85
88
- response , did_insert = self .insert_toolbar (request , response , rendered )
89
- if did_insert :
90
- if "Content-Length" in response :
91
- response ["Content-Length" ] = len (response .content )
92
- return response
93
-
94
- def configure_toolbar (self , request , toolbar ):
95
- pass
96
-
97
- @staticmethod
98
- def insert_toolbar (request , response , rendered ):
99
86
# Insert the toolbar in the response.
100
87
content = response .content .decode (response .charset )
101
88
insert_before = dt_settings .get_config ()["INSERT_BEFORE" ]
@@ -104,8 +91,8 @@ def insert_toolbar(request, response, rendered):
104
91
if len (bits ) > 1 :
105
92
bits [- 2 ] += rendered
106
93
response .content = insert_before .join (bits )
107
- return response , True
108
- return response , False
94
+ return response
95
+ return response
109
96
110
97
@staticmethod
111
98
def generate_server_timing_header (response , panels ):
0 commit comments