diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2008-07-08 02:08:33 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2008-07-08 02:08:33 +0000 |
| commit | 4406d283e13819b04556df21044089b7d119edb0 (patch) | |
| tree | d4223e9c222172cc6cb0d5954d8f314d7dbe200e /docs | |
| parent | f19284b85aed37fd4008c56f1aa7a36517305e54 (diff) | |
Fixed #7478 -- Rolled QuerySetPaginator into the Paginator class, to simplify things. QuerySetPaginator still exists as an alias, for backwards compatibility. Thanks for the suggestion, batiste@dosimple.ch
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/pagination.txt | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/docs/pagination.txt b/docs/pagination.txt index 486c92264b..20c6ca84cc 100644 --- a/docs/pagination.txt +++ b/docs/pagination.txt @@ -59,6 +59,11 @@ page:: ... InvalidPage +Note that you can give ``Paginator`` a list/tuple or a Django ``QuerySet``. The +only difference is in implementation; if you pass a ``QuerySet``, the +``Paginator`` will call its ``count()`` method instead of using ``len()``, +because the former is more efficient. + ``Paginator`` objects ===================== @@ -116,13 +121,6 @@ Attributes ``paginator`` -- The associated ``Paginator`` object. -``QuerySetPaginator`` objects -============================= - -Use ``QuerySetPaginator`` instead of ``Paginator`` if you're paginating across -a ``QuerySet`` from Django's database API. This is slightly more efficient, and -there are no API differences between the two classes. - The legacy ``ObjectPaginator`` class ==================================== |
