Example #1
0
def account_index():
    """账单条目列表
    
    不再编写模板,请参考 Person 相关的模板
    有必要掌握 Bootstrap3
    """
    """个人列表
    """

    rank = request.args.get('rank', 'id')
    search = request.args.get('search', '')
    order = request.args.get('order', 'asc')

    page, per_page, offset = get_page_items()
    accounts = Account.find(search=search, order=order, rank=rank)
    pagination = get_pagination(page=page, total=accounts.count())

    return render_template('/account/index.html',
                           accounts=accounts.offset(offset).limit(per_page),
                           pagination=pagination,
                           search=search, order=order)