e403821323d529980407c05da77409c7e1c5c2a0,debug_toolbar/panels/headers.py,HeaderDebugPanel,content,#HeaderDebugPanel#,38
Before Change
return ""
def content(self):
t = Template("""
<dl>
{% for h in headers %}
<dt><strong>{{ h.key }}</strong></dt>
<dd>{{ h.value }}</dd>
{% endfor %}
</dl>
""")
headers = []
for k, v in self.request.META.iteritems():
if k in self.header_filter:
headers.append({"key": k, "value": v})
c = Context({"headers": headers})
return t.render(c)
After Change
return ""
def content(self):
context = {
"headers": dict([(k, self.request.META[k]) for k in self.header_filter if k in self.request.META]),
}
return render_to_string("debug_toolbar/panels/headers.html", context)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: jazzband/django-debug-toolbar
Commit Name: e403821323d529980407c05da77409c7e1c5c2a0
Time: 2008-09-08
Author: rob@cogit8.org
File Name: debug_toolbar/panels/headers.py
Class Name: HeaderDebugPanel
Method Name: content
Project Name: chakki-works/doccano
Commit Name: 49d41416e440926f0a9a8243b4d77f6f5468efe9
Time: 2019-03-12
Author: light.tree.1.13@gmail.com
File Name: app/server/api.py
Class Name: TextDownloadAPI
Method Name: get
Project Name: bokeh/bokeh
Commit Name: f14f475431d1a686ba2d29c4fc90ec649670f7fa
Time: 2017-08-17
Author: lcanavan@continuum.io
File Name: bokeh/embed.py
Class Name:
Method Name: notebook_div