def statistics(): page=request.args.get('page',1,type=int) per_page=current_app.config['ADMIN_STATISTICS_PER_PAGE'] if page == -1: page = ((Awards.get_count() - 1) // per_page) + 1 pagination = Awards.get_list_pageable(page, per_page) awards_list = pagination.items awards = Awards.get_stu_awards_list() count = Awards.get_count() student_list = Student.get_list_pageable(page,per_page).items return render_template('admin/statistics.html', title = u'统计', awards_list = awards_list, student_list = student_list, alist = awards, count = count, pagination = pagination)