views.py 文件源码

python
阅读 68 收藏 0 点赞 0 评论 0

项目:extractfacts 作者: oneroyalace 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号