Python自学笔记-Django分页器小实例

from django.core.paginator import Paginator
iter = 'abcdefhijklmnopqw'
paginator = Paginator(iter,4)
paginator.page(1)
<Page 1 of 5>
page1 = paginator.page(1)
page1.object_list
'abcd'
page3 = paginator.page(3)
page3.object_list
'jklm'
上一篇:B. School Marks(典型贪心)


下一篇:用mpvue构建微信小程序