ad110e020cbae062ba024d91223df519af3adc96,debug_toolbar/panels/template.py,TemplateDebugPanel,content,#TemplateDebugPanel#,67
Before Change
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
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)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: tflearn/tflearn
Commit Name: ec14cd301fdb22bd15612796ef28bd1b1a15a7e2
Time: 2017-02-22
Author: aymeric.damien@gmail.com
File Name: tflearn/activations.py
Class Name:
Method Name: prelu
Project Name: oddt/oddt
Commit Name: 9aea8066d7dd97a6b27f50286adc22fc3c834447
Time: 2018-05-17
Author: maciek@wojcikowski.pl
File Name: rdkit_fixer.py
Class Name:
Method Name: AssignPDBResidueBondOrdersFromTemplate