Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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: http://code.djangoproject.com/svn/django/branches/unicode@5208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit bc044651aaed9eedbc195414a71bde4e375a7c73 1 parent 50ef85f
Malcolm Tredinnick authored May 12, 2007

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/db/backends/util.py
3  django/db/backends/util.py
... ...
@@ -1,5 +1,6 @@
1 1
 import datetime
2 2
 from time import time
  3
+from django.utils.encoding import smart_unicode
3 4
 
4 5
 class CursorDebugWrapper(object):
5 6
     def __init__(self, cursor, db):
@@ -17,7 +18,7 @@ def execute(self, sql, params=()):
17 18
             if not isinstance(params, (tuple, dict)):
18 19
                 params = tuple(params)
19 20
             self.db.queries.append({
20  
-                'sql': sql % params,
  21
+                'sql': smart_unicode(sql) % params,
21 22
                 'time': "%.3f" % (stop - start),
22 23
             })
23 24
 

0 notes on commit bc04465

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