def pages(self, index, limit, total): return list(utils.generate_pages(index, limit, total))
def build_links(self, request): for i in utils.generate_pages(self.number, self.paginator.page_limit, self.paginator.num_pages): yield self.create_link(request, i)