user.py 文件源码

python
阅读 54 收藏 0 点赞 0 评论 0

项目:akamatsu 作者: rmed 项目源码 文件源码
def user_index(page=1):
    """Show list of users registered in the application.

    Args:
        page (int): Listing page number to show.
    """
    order_key, order_dir, ordering = _sort_users(request.args)

    users = (
        User.query
        .order_by(ordering)
        .paginate(page, 20, False)
    )

    try:
        return render_template(
            'akamatsu/dashboard/user/index.html',
            users=users,
            order_key=order_key,
            order_dir=order_dir
        )

    except NotFound:
        # Show a 'no posts found' notice instead of a 404 error
        return render_template('akamatsu/dashboard/user/index.html')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号