Skip to content
Commit 9a5301cc authored by Gary Wilson Jr's avatar Gary Wilson Jr
Browse files

Made the Paginator class a bit more backwards compatible with the lecacy...

Made the Paginator class a bit more backwards compatible with the lecacy `ObjectPaginator` class by using the `ObjectPaginator`'s `_get_count` method.  Instead of explicitly checking for an instance of `QuerySet`, this now allows any object with a `count()` or `__len__()` method defined to be passed to Paginator.  For one, this is useful when you have custom `QuerySet`-like classes that implement a `count()` method but don't inherit from `QuerySet` explicitly.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 6a287ed9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment