Django2.0 + ListView + Pagination
折腾了一上午,终于把django中的ListView视图的分页效果做好了,话不多少,首先展示的是效果图:
相关代码如下:
views.js
class IndexView(ListView):
model = User
template_name = 'users/index.html'
paginate_by = 5 #每页显示多少条数据
ordering = ...
原创
2019-05-10 12:48:48 ·
435 阅读 ·
0 评论