From: Felix Dörre Date: Wed, 22 Nov 2017 14:04:46 +0000 (+0100) Subject: add: display active user name X-Git-Url: https://code.wpia.club/?p=motion.git;a=commitdiff_plain;h=3a406f70cf855f7b9e8de67ad84b2cded9b91fad add: display active user name --- diff --git a/motion.py b/motion.py index f0318d2..783cf47 100644 --- a/motion.py +++ b/motion.py @@ -49,6 +49,7 @@ def lookup_user(): db.prepare("INSERT INTO voter(\"email\") VALUES($1)")(user) rv = db.prepare("SELECT id FROM voter WHERE email=$1")(user) g.voter = rv[0].get("id"); + g.user = user g.roles = {} for r in roles: diff --git a/templates/index.html b/templates/index.html index fdbb010..4ff3a44 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,6 +3,11 @@
{%- if categories|length != 0 %}
+
+
+User: {{g.user}} +
+