summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2011-02-14 00:06:52 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2011-02-14 00:06:52 +0000
commit7e46b170007dd7b9a95e845cbb971d4eb170e317 (patch)
tree49eb80378a625a728692271be8359bc2a32e558c
parent337b6786fdfcc7a8b2f8eced0de6b966ab5553de (diff)
Fixed #15297 -- Corrected an attribute naming regressoin from fixing #9964. Thanks to leonov for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/db/backends/util.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/django/db/backends/util.py b/django/db/backends/util.py
index ff0fb14f05..2f92a30c9e 100644
--- a/django/db/backends/util.py
+++ b/django/db/backends/util.py
@@ -10,13 +10,13 @@ logger = getLogger('django.db.backends')
class CursorWrapper(object):
- def __init__(self, cursor, connection):
+ def __init__(self, cursor, db):
self.cursor = cursor
- self.connection = connection
+ self.db = db
def __getattr__(self, attr):
- if self.connection.is_managed():
- self.connection.set_dirty()
+ if self.db.is_managed():
+ self.db.set_dirty()
if attr in self.__dict__:
return self.__dict__[attr]
else:
@@ -35,8 +35,8 @@ class CursorDebugWrapper(CursorWrapper):
finally:
stop = time()
duration = stop - start
- sql = self.connection.ops.last_executed_query(self.cursor, sql, params)
- self.connection.queries.append({
+ sql = self.db.ops.last_executed_query(self.cursor, sql, params)
+ self.db.queries.append({
'sql': sql,
'time': "%.3f" % duration,
})
@@ -51,7 +51,7 @@ class CursorDebugWrapper(CursorWrapper):
finally:
stop = time()
duration = stop - start
- self.connection.queries.append({
+ self.db.queries.append({
'sql': '%s times: %s' % (len(param_list), sql),
'time': "%.3f" % duration,
})