summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-03-23 10:14:32 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-03-23 10:14:32 +0000
commit99150048ac1158e3978c2854bdb07bd4f2fce9fe (patch)
tree4b63f52bab8c65fdbee958e7a994c581264f32f0
parent0fea1348d6ade374a91f8328d630dd442c1bc7c9 (diff)
Fixed a problem in the backwards-compat abilities of the paginator. Calling count() on a list throws a TypeError not an AttributeError.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/paginator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/paginator.py b/django/core/paginator.py
index dabd20dfc0..04cc4bf481 100644
--- a/django/core/paginator.py
+++ b/django/core/paginator.py
@@ -173,7 +173,7 @@ class ObjectPaginator(Paginator):
if self._count is None:
try:
self._count = self.object_list.count()
- except AttributeError:
+ except TypeError:
self._count = len(self.object_list)
return self._count
count = property(_get_count)