Skip to content

Commit

Permalink
Incorporate feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed May 4, 2017
1 parent 66fa963 commit a0ebcc3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions debug_toolbar/panels/templates/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ def _store_template_info(self, sender, **kwargs):
template, context = kwargs['template'], kwargs['context']

# Skip templates that we are generating through the debug toolbar.
if (isinstance(template.name, six.string_types) and
template.name.startswith(
tuple(self.toolbar.config['SKIP_TEMPLATE_PREFIXES']))):
if (isinstance(template.name, six.string_types) and (
template.name.startswith('debug_toolbar/') or
template.name.startswith(
tuple(self.toolbar.config['SKIP_TEMPLATE_PREFIXES'])))):
return

context_list = []
Expand Down
3 changes: 1 addition & 2 deletions debug_toolbar/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@
'PROFILER_MAX_DEPTH': 10,
'SHOW_TEMPLATE_CONTEXT': True,
'SKIP_TEMPLATE_PREFIXES': (
'debug_toolbar/',
'django/forms/widgets/',
'admin/widgets',
'admin/widgets/',
),
'SQL_WARNING_THRESHOLD': 500, # milliseconds
}
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Panel options

* ``SKIP_TEMPLATE_PREFIXES``

Default: ``('debug_toolbar/', 'django/forms/widgets/', 'admin/widgets/')``
Default: ``('django/forms/widgets/', 'admin/widgets/')``

Panel: templates.

Expand Down

0 comments on commit a0ebcc3

Please sign in to comment.