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')
评论列表
文章目录