| 878 | | In older versions of Django, before ``paginator`` and ``page_obj`` were added |
|---|
| 879 | | to this template's context, the template included several other variables |
|---|
| 880 | | related to pagination. Note that you should *NOT* use these variables anymore; |
|---|
| 881 | | use ``paginator`` and ``page_obj`` instead, because they let you do everything |
|---|
| 882 | | these old variables let you do (and more!). But for legacy installations, |
|---|
| 883 | | here's a list of those old template variables: |
|---|
| 884 | | |
|---|
| 885 | | * ``results_per_page``: The number of objects per page. (Same as the |
|---|
| 886 | | ``paginate_by`` parameter.) |
|---|
| 887 | | |
|---|
| 888 | | * ``has_next``: A boolean representing whether there's a next page. |
|---|
| 889 | | |
|---|
| 890 | | * ``has_previous``: A boolean representing whether there's a previous page. |
|---|
| 891 | | |
|---|
| 892 | | * ``page``: The current page number, as an integer. This is 1-based. |
|---|
| 893 | | |
|---|
| 894 | | * ``next``: The next page number, as an integer. If there's no next page, |
|---|
| 895 | | this will still be an integer representing the theoretical next-page |
|---|
| 896 | | number. This is 1-based. |
|---|
| 897 | | |
|---|
| 898 | | * ``previous``: The previous page number, as an integer. This is 1-based. |
|---|
| 899 | | |
|---|
| 900 | | * ``last_on_page``: The number of the |
|---|
| 901 | | last result on the current page. This is 1-based. |
|---|
| 902 | | |
|---|
| 903 | | * ``first_on_page``: The number of the |
|---|
| 904 | | first result on the current page. This is 1-based. |
|---|
| 905 | | |
|---|
| 906 | | * ``pages``: The total number of pages, as an integer. |
|---|
| 907 | | |
|---|
| 908 | | * ``hits``: The total number of objects across *all* pages, not just this |
|---|
| 909 | | page. |
|---|
| 910 | | |
|---|
| 911 | | * ``page_range``: A list of the page numbers that are available. This is |
|---|
| 912 | | 1-based. |
|---|
| | 878 | See the `pagination documentation`_ for more information on the ``Paginator`` |
|---|
| | 879 | and ``Page`` objects. |
|---|