diff options
| author | Aymeric Augustin | 2013-10-17 21:55:34 +0200 |
|---|---|---|
| committer | Aymeric Augustin | 2013-10-17 21:55:34 +0200 |
| commit | 9b3920646edde08d8fbb57c4b9f1d204fc83f09d (patch) | |
| tree | a2b6da036f2c0d81ced6d336d7b46b334ef55d26 /debug_toolbar/utils | |
| parent | 4d829c450327e015ee5d6919f6f5029079b7ebe0 (diff) | |
| download | django-debug-toolbar-9b3920646edde08d8fbb57c4b9f1d204fc83f09d.tar.bz2 | |
Support non-ASCII queries in the SQL panel.
Fix #28.
Diffstat (limited to 'debug_toolbar/utils')
| -rw-r--r-- | debug_toolbar/utils/__init__.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/debug_toolbar/utils/__init__.py b/debug_toolbar/utils/__init__.py index 297c901..75f3024 100644 --- a/debug_toolbar/utils/__init__.py +++ b/debug_toolbar/utils/__init__.py @@ -7,6 +7,7 @@ import sys from django.conf import settings from django.views.debug import linebreak_iter +from django.utils.encoding import force_text from django.utils.html import escape from django.utils.safestring import mark_safe from django.utils import six @@ -39,10 +40,7 @@ def tidy_stacktrace(stack): continue if socketserver_path in s_path: continue - if not text: - text = '' - else: - text = (''.join(text)).strip() + text = (''.join(force_text(t) for t in text)).strip() if text else '' trace.append((path, line_no, func_name, text)) return trace |
