summaryrefslogtreecommitdiff
path: root/docs/generic_views.txt
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-03-20 19:56:44 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-03-20 19:56:44 +0000
commit334279f8dd3abd98aa527a1658cb3ff5c3973ec7 (patch)
treef440439fc9f79a39cfb90c16bf5c2df0106b14ee /docs/generic_views.txt
parent04da22633fcda983cb9ee69e63b2ebe99301b717 (diff)
queryset-refactor: Merged from trunk up to [7338].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/generic_views.txt')
-rw-r--r--docs/generic_views.txt17
1 files changed, 15 insertions, 2 deletions
diff --git a/docs/generic_views.txt b/docs/generic_views.txt
index 17187894c0..b7beb0b4be 100644
--- a/docs/generic_views.txt
+++ b/docs/generic_views.txt
@@ -751,6 +751,19 @@ In addition to ``extra_context``, the template's context will be:
If the results are paginated, the context will contain these extra variables:
+ * **New in Django development version:** ``paginator``: An instance of
+ ``django.core.paginator.Paginator``.
+
+ * **New in Django development version:** ``page_obj``: An instance of
+ ``django.core.paginator.Page``.
+
+In older versions of Django, before ``paginator`` and ``page_obj`` were added
+to this template's context, the template included several other variables
+related to pagination. Note that you should *NOT* use these variables anymore;
+use ``paginator`` and ``page_obj`` instead, because they let you do everything
+these old variables let you do (and more!). But for legacy installations,
+here's a list of those old template variables:
+
* ``results_per_page``: The number of objects per page. (Same as the
``paginate_by`` parameter.)
@@ -777,8 +790,8 @@ If the results are paginated, the context will contain these extra variables:
* ``hits``: The total number of objects across *all* pages, not just this
page.
- * **New in Django development version:** ``page_range``: A list of the
- page numbers that are available. This is 1-based.
+ * ``page_range``: A list of the page numbers that are available. This is
+ 1-based.
Notes on pagination
~~~~~~~~~~~~~~~~~~~