aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/utils/tracking/db.py
diff options
context:
space:
mode:
authorDavid Cramer2011-10-26 13:44:57 -0700
committerDavid Cramer2011-10-26 13:44:57 -0700
commitf3cec8fc9bc65149e7b58a90b5264df4ed6d3859 (patch)
tree4888892ead8db417ad6b7034c2c66b9052c63594 /debug_toolbar/utils/tracking/db.py
parentc9147364e40fd01d5fafcbdeb1c9563d2b5a4361 (diff)
parente455bec46f7beb92526acf100d269d88c2ede064 (diff)
downloaddjango-debug-toolbar-f3cec8fc9bc65149e7b58a90b5264df4ed6d3859.tar.bz2
Merge pull request #223 from Apkawa/master
Fixed profiling.ProfilingDebugPanel and bug for raw sql with no latin comments
Diffstat (limited to 'debug_toolbar/utils/tracking/db.py')
-rw-r--r--debug_toolbar/utils/tracking/db.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/debug_toolbar/utils/tracking/db.py b/debug_toolbar/utils/tracking/db.py
index a40976e..7370374 100644
--- a/debug_toolbar/utils/tracking/db.py
+++ b/debug_toolbar/utils/tracking/db.py
@@ -1,4 +1,3 @@
-import inspect
import sys
from datetime import datetime
@@ -7,7 +6,7 @@ from threading import local
from django.conf import settings
from django.template import Node
from django.utils import simplejson
-from django.utils.encoding import force_unicode
+from django.utils.encoding import force_unicode, smart_str
from django.utils.hashcompat import sha_constructor
from debug_toolbar.utils import ms_from_timedelta, tidy_stacktrace, get_template_info, \
@@ -113,7 +112,7 @@ class NormalCursorWrapper(object):
'duration': duration,
'raw_sql': sql,
'params': _params,
- 'hash': sha_constructor(settings.SECRET_KEY + sql + _params).hexdigest(),
+ 'hash': sha_constructor(settings.SECRET_KEY + smart_str(sql) + _params).hexdigest(),
'stacktrace': stacktrace,
'start_time': start,
'stop_time': stop,