From caee4a3ee7d7f6b9958c41152923c971b3a3d146 Mon Sep 17 00:00:00 2001 From: s3lph <1375407-s3lph@users.noreply.gitlab.com> Date: Wed, 20 Jul 2022 21:43:47 +0200 Subject: [PATCH] Sort user list in db.list_users rather than during templating. Closes !82 --- matemat/db/facade.py | 1 + templates/productlist.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/matemat/db/facade.py b/matemat/db/facade.py index 3572ff9..ec4f3c7 100644 --- a/matemat/db/facade.py +++ b/matemat/db/facade.py @@ -87,6 +87,7 @@ class MatematDatabase(object): SELECT user_id, username, email, is_admin, is_member, balance, receipt_pref FROM users WHERE touchkey IS NOT NULL OR NOT :must_have_touchkey + ORDER BY username COLLATE NOCASE ASC ''', { 'must_have_touchkey': with_touchkey }): diff --git a/templates/productlist.html b/templates/productlist.html index 104856d..8f1798e 100644 --- a/templates/productlist.html +++ b/templates/productlist.html @@ -36,7 +36,7 @@