Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

unicode: Make sure we don't try to insert unicode data into bytestrin…

…gs in the

debug database cursor. Might not  be necessary, but it can't hurt in any case.
Refs #3891.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 50ef85f commit bc044651aaed9eedbc195414a71bde4e375a7c73 @malcolmt malcolmt committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/db/backends/
3  django/db/backends/
@@ -1,5 +1,6 @@
import datetime
from time import time
+from django.utils.encoding import smart_unicode
class CursorDebugWrapper(object):
def __init__(self, cursor, db):
@@ -17,7 +18,7 @@ def execute(self, sql, params=()):
if not isinstance(params, (tuple, dict)):
params = tuple(params)
- 'sql': sql % params,
+ 'sql': smart_unicode(sql) % params,
'time': "%.3f" % (stop - start),

0 comments on commit bc04465

Please sign in to comment.
Something went wrong with that request. Please try again.