diff options
| author | Alex Gaynor | 2009-06-16 14:37:44 -0500 | 
|---|---|---|
| committer | Alex Gaynor | 2009-06-16 14:37:44 -0500 | 
| commit | 52dbdd5031b1d025b6553f60006a712b759ca0c5 (patch) | |
| tree | 34d805e3b6b38edf77915ece6664665d6debc527 /debug_toolbar/panels/sql.py | |
| parent | c5b77822fed87245f08e4d538d53f868ac047f45 (diff) | |
| download | django-debug-toolbar-52dbdd5031b1d025b6553f60006a712b759ca0c5.tar.bz2 | |
provide an option to see stuff indjango in the sql stack trace
Diffstat (limited to 'debug_toolbar/panels/sql.py')
| -rw-r--r-- | debug_toolbar/panels/sql.py | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/debug_toolbar/panels/sql.py b/debug_toolbar/panels/sql.py index d3ac7f3..c8d50d9 100644 --- a/debug_toolbar/panels/sql.py +++ b/debug_toolbar/panels/sql.py @@ -2,6 +2,7 @@ import os  import SocketServer  import time  import traceback +  import django  from django.conf import settings  from django.db import connection @@ -10,6 +11,7 @@ from django.template.loader import render_to_string  from django.utils import simplejson  from django.utils.encoding import force_unicode  from django.utils.hashcompat import sha_constructor +  from debug_toolbar.panels import DebugPanel  # Figure out some paths @@ -26,7 +28,7 @@ def tidy_stacktrace(strace):      trace = []      for s in strace[:-1]:          s_path = os.path.realpath(s[0]) -        if django_path in s_path and not 'django/contrib' in s_path: +        if getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {}).get('HIDE_DJANGO_SQL', True) and  django_path in s_path and not 'django/contrib' in s_path:              continue          if socketserver_path in s_path:              continue | 
