"> Issues 0 Pull Requests 0 Commits 121 Releases 0

No Description

page_utils.py 495B

    # -*- coding: utf-8 -*- from django.db.models.query import QuerySet def pagination(queryset, page, num=10): """ DIY Pagination Funciton :param queryset: :param page: :param num: the number of query for one page :return: the query of the page, the number of query left after the page """ start, end, total = num * (page - 1), num * page, queryset.count() if isinstance(queryset, QuerySet) else len(queryset) return queryset[start: end], max(total - end, 0)
kodo - Gogs: Go Git Service

Geen omschrijving

huangqimin: 3bbfc60c06 :art: Support del_clerk_sale_submit_api 6 jaren geleden
..
commands 3bbfc60c06 :art: Support del_clerk_sale_submit_api 6 jaren geleden
__init__.py b95db9c5c3 Basic gis command 8 jaren geleden