Django

Code

Changeset 5208

Show
Ignore:
Timestamp:
05/12/07 10:40:46 (1 year ago)
Author:
mtredinnick
Message:

unicode: Make sure we don't try to insert unicode data into bytestrings in the
debug database cursor. Might not be necessary, but it can't hurt in any case.
Refs #3891.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/unicode/django/db/backends/util.py

    r5126 r5208  
    11import datetime 
    22from time import time 
     3from django.utils.encoding import smart_unicode 
    34 
    45class CursorDebugWrapper(object): 
     
    1819                params = tuple(params) 
    1920            self.db.queries.append({ 
    20                 'sql': sql % params, 
     21                'sql': smart_unicode(sql) % params, 
    2122                'time': "%.3f" % (stop - start), 
    2223            })