def get_table_pagination(self, table):
'''
Returns pagination options: True for standard pagination (default),
False for no pagination, and a dictionary for custom pagination.
'''
paginate = self.table_pagination
if hasattr(self, 'paginate_by') and self.paginate_by is not None:
# Since ListView knows the concept paginate_by, we use that if no
# other pagination is configured.
paginate = paginate or {}
paginate['per_page'] = self.paginate_by
if paginate is None:
return True
return paginate
评论列表
文章目录