provide keyword arguments to paginate

This commit is contained in:
deflax 2024-04-03 20:16:59 +03:00
parent f3d0bc1a5f
commit a29ee1bd3a

View file

@ -31,7 +31,7 @@ def index():
@fresh_login_required
@admin_required
def list_users(page):
sqlquery = User.query.filter_by(active=True).order_by(User.last_seen.desc()).paginate(page, current_app.config['ITEMS_PER_PAGE'], error_out=False)
sqlquery = User.query.filter_by(active=True).order_by(User.last_seen.desc()).paginate(page=page, per_page=current_app.config['ITEMS_PER_PAGE'], error_out=False)
return render_template('admin/list_users.html', users=sqlquery.items, page=page)
@admin.route("/listitems", methods=['GET'])