Django

Code

Changeset 7309

Show
Ignore:
Timestamp:
03/18/08 16:58:31 (4 months ago)
Author:
adrian
Message:

Improved docs/generic_views.txt to note the new template context for the object_list generic view

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/generic_views.txt

    r7294 r7309  
    752752If the results are paginated, the context will contain these extra variables: 
    753753 
     754    * **New in Django development version:** ``paginator``: An instance of 
     755      ``django.core.paginator.Paginator``. 
     756 
     757    * **New in Django development version:** ``page_obj``: An instance of 
     758      ``django.core.paginator.Page``. 
     759 
     760In older versions of Django, before ``paginator`` and ``page_obj`` were added 
     761to this template's context, the template included several other variables 
     762related to pagination. Note that you should *NOT* use these variables anymore; 
     763use ``paginator`` and ``page_obj`` instead, because they let you do everything 
     764these old variables let you do (and more!). But for legacy installations, 
     765here's a list of those old template variables: 
     766 
    754767    * ``results_per_page``: The number of objects per page. (Same as the 
    755768      ``paginate_by`` parameter.) 
     
    778791      page. 
    779792 
    780     * **New in Django development version:** ``page_range``: A list of the  
    781       page numbers that are available. This is 1-based. 
     793    * ``page_range``: A list of the page numbers that are available. This is 
     794      1-based. 
    782795 
    783796Notes on pagination