Chinaunix首页 | 论坛 | 博客
  • 博客访问: 28552565
  • 博文数量: 2065
  • 博客积分: 10377
  • 博客等级: 上将
  • 技术积分: 21525
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-04 17:50
文章分类

全部博文(2065)

文章存档

2012年(2)

2011年(19)

2010年(1160)

2009年(969)

2008年(153)

分类: Python/Ruby

2009-08-13 14:59:10

当然我们可以指定哦!
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
其分页的方法就这么简单的!
阅读(586) | 评论(3) | 转发(0) |
给主人留下些什么吧!~~

yyniao19852009-09-12 10:57:37

如果方便的话,尽快指教一下,期待中.....

yyniao19852009-09-12 10:56:21

你好,看样子是个美女啊,感觉很少有美女做程序的,赞一下,下面就是要请教问题了,我最近在做这个视图分页,一直搞不定,你写的这个我看明白了,但不知道该怎么用,可以联系下么,我最近这个东西比较急用,我电话1360559235,如果电话不方便QQ:315696115,多谢了

yyniao19852009-09-12 10:51:41

haha