mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user