Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 7e46b170007dd7b9a95e845cbb971d4eb170e317 1 parent 337b678
@freakboy3742 freakboy3742 authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 django/db/backends/util.py
View
14 django/db/backends/util.py
@@ -10,13 +10,13 @@
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 @@ def execute(self, sql, params=()):
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 @@ def executemany(self, sql, param_list):
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,
})
Please sign in to comment.
Something went wrong with that request. Please try again.