From 2d7149ae2db1134a5f51a9ee75a438e0de682c58 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 22 Jul 2018 23:18:03 +0200 Subject: [PATCH] Sort in alphabetical order --- webserver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webserver.py b/webserver.py index 00974ae3..de69f083 100644 --- a/webserver.py +++ b/webserver.py @@ -54,8 +54,8 @@ def page_500(): def page_main(): if fl_session.get("user_id"): db_session = db.Session() - royals = db_session.query(db.Royal).all() - wiki_pages = db_session.query(db.WikiEntry).all() + royals = db_session.query(db.Royal).order_by(db.Royal.username).all() + wiki_pages = db_session.query(db.WikiEntry).order_by(db.WikiEntry.key).all() db_session.close() return render_template("main.html", royals=royals, wiki_pages=wiki_pages, config=config) return redirect(url_for("page_login"))