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)
def get_totalusers(): totalusers = OpenVPNUser.get_total_nums() return jsonify(totalusers)