Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #5883 -- Added __iter__ methods to the debug cursor and the pos…

…tgresql backend cursor.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 732074541a17cde1d6d634007949d8a8c83cdc1a 1 parent 50ecd75
@malcolmt malcolmt authored
View
3  django/db/backends/postgresql/base.py
@@ -56,6 +56,9 @@ def __getattr__(self, attr):
else:
return getattr(self.cursor, attr)
+ def __iter__(self):
+ return iter(self.cursor)
+
class DatabaseFeatures(BaseDatabaseFeatures):
pass # This backend uses all the defaults.
View
3  django/db/backends/util.py
@@ -41,6 +41,9 @@ def __getattr__(self, attr):
else:
return getattr(self.cursor, attr)
+ def __iter__(self):
+ return iter(self.cursor)
+
###############################################
# Converters from database (string) to Python #
###############################################
Please sign in to comment.
Something went wrong with that request. Please try again.