ad110e020cbae062ba024d91223df519af3adc96,debug_toolbar/panels/template.py,TemplateDebugPanel,content,#TemplateDebugPanel#,67
Before Change
info["template"] = template
// Clean up context for better readability
if getattr(settings, "DEBUG_TOOLBAR_CONFIG", {}).get("SHOW_TEMPLATE_CONTEXT", True):
context_data = template_data.get("context", None)
context_list = []
for context_layer in context_data.dicts:
if hasattr(context_layer, "items"):
for key, value in context_layer.items():
// Replace any request elements - they have a large
// unicode representation and the request data is
// already made available from the Request Vars panel.
if isinstance(value, http.HttpRequest):
context_layer[key] = "<<request>>"
// Replace the debugging sql_queries element. The SQL
// data is already made available from the SQL panel.
elif key == "sql_queries" and isinstance(value, list):
context_layer[key] = "<<sql_queries>>"
// Replace LANGUAGES, which is available in i18n context processor
elif key == "LANGUAGES" and isinstance(value, tuple):
context_layer[key] = "<<languages>>"
try:
context_list.append(pformat(context_layer))
except UnicodeEncodeError:
pass
info["context"] = "\n".join(context_list)
template_context.append(info)
context = self.context.copy()
After Change
info["template"] = template
// Clean up context for better readability
if getattr(settings, "DEBUG_TOOLBAR_CONFIG", {}).get("SHOW_TEMPLATE_CONTEXT", True):
context_list = template_data.get("context", [])
info["context"] = "\n".join(context_list)
template_context.append(info)
context = self.context.copy()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: jazzband/django-debug-toolbar
Commit Name: ad110e020cbae062ba024d91223df519af3adc96
Time: 2011-07-12
Author: dcramer@gmail.com
File Name: debug_toolbar/panels/template.py
Class Name: TemplateDebugPanel
Method Name: content
Project Name: GoogleCloudPlatform/healthcare
Commit Name: db2a9d3a62e36db12066c980d180377fffb31fcc
Time: 2018-11-29
Author: noreply@google.com
File Name: deploy/rule_generator/rule_generator.py
Class Name:
Method Name: run
Project Name: commonsense/conceptnet5
Commit Name: 79d149dd39dc7e7d22c623c0a4a4d3ab99e61c76
Time: 2017-06-15
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/transforms.py
Class Name:
Method Name: choose_small_vocabulary