Пример #1
0
def get_users():
    start, count = paginate()
    users = OpenVPNUser.get_all(start, count)
    total = OpenVPNUser.get_total_nums()
    total_page = math.ceil(total / count)
    page = get_page_from_query()
    return json_res(count=count, page=page, total=total, total_page=total_page, items=users)
Пример #2
0
def get_totalusers():
    totalusers = OpenVPNUser.get_total_nums()
    return jsonify(totalusers)