django执行数据库查询以后返回分页的结果

分页: page = int(page) + 1 try: res = models.tables.objects.all().order_by('-id') paginator = Paginator(res, page_size) # 生成分页实例 dic['totalCount'] = paginator.count # 获取数据总条数 try:
相关文章
相关标签/搜索