当然我们可以指定哦!
If the results are paginated, the context will contain these
extra variables:(如果有分页存在的话就要考虑如下的可选参数)
results_per_page : The number of objects per page. (This
is the same as the paginate_by parameter.)(每页显示条数)
[/list]
has_next : 一个布尔值表示是否有下一页.
[/list]
has_previous : 一个布尔值表示是否有上一页.
[/list]
page : 表示当前页的页码,是一个整数(如第9页),第一页是从1开始计算的。
[/list]
next : The next page number, as an integer. If theres no
next page, this will still be an integer representing the theoretical next-page
number. This is 1-based.
[/list]
previous : The previous page number, as an integer. This
is 1-based.
[/list]
pages : The total number of pages, as an
integer.
[/list]
hits : The total number of objects across all
pages, not just this page.
[/list]
(r'^objects/page(?P[0-9]+)/$', 'object_list', dict(info_dict))
Pass the page number via the page query-string
parameter. For example, a URL would look like this:
/objects/?page=3
其分页的方法就这么简单的!
阅读(602) | 评论(3) | 转发(0) |