def file_index(page=1):
"""Show available actions regarding files.
Args:
page (int): Listing page number to show.
"""
order_key, order_dir, ordering = _sort_uploads(request.args)
files = (
FileUpload.query
.order_by(ordering)
.paginate(page, 20, False)
)
try:
return render_template(
'akamatsu/dashboard/file/index.html',
files=files,
order_key=order_key,
order_dir=order_dir
)
except NotFound:
# Show a 'no files found' notice instead of a 404 error
return render_template('akamatsu/dashboard/file/index.html')
评论列表
文章目录