From e8c666c7119b3898e39b295f49bd10363a0299d3 Mon Sep 17 00:00:00 2001 From: Lynne Date: Tue, 17 Sep 2019 19:13:36 +1000 Subject: [PATCH] display bot icons! --- templates/home.html | 2 +- webui.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/home.html b/templates/home.html index 4ba5289..65d824c 100644 --- a/templates/home.html +++ b/templates/home.html @@ -19,7 +19,7 @@
{% for bot in bots %}
-
+
{% set handle_list = bot['handle'].split('@') %}
@{{ handle_list[1] }}@{{ handle_list[2] }}
diff --git a/webui.py b/webui.py index 4aef4dd..3fcdb4a 100644 --- a/webui.py +++ b/webui.py @@ -44,7 +44,7 @@ def home(): c.execute("SELECT COUNT(*) FROM `bots` WHERE user_id = %s AND enabled = TRUE", (session['user_id'],)) active_count = c.fetchone()[0] dc = mysql.connection.cursor(MySQLdb.cursors.DictCursor) - dc.execute("SELECT `handle`, `enabled`, `last_post`, `post_frequency` FROM `bots` WHERE user_id = %s", (session['user_id'],)) + dc.execute("SELECT `handle`, `enabled`, `last_post`, `post_frequency`, `icon` FROM `bots` WHERE user_id = %s", (session['user_id'],)) bots = dc.fetchall() dc.close()