From 4e40699a612e494d4d740d69b18d34aa40749789 Mon Sep 17 00:00:00 2001 From: Arnaud DELCASSE Date: Thu, 30 Aug 2012 10:27:02 +0200 Subject: [PATCH] Fixed hardcoded vote publisher value to maethor --- main.py | 2 +- templates/vote.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 21a7500..dc2259d 100755 --- a/main.py +++ b/main.py @@ -381,7 +381,7 @@ def votes(votes): basequery = 'select votes.*, max_votes from votes left join (' + max_votes + ') as max_votes on votes.id_group = max_votes.id_group' nb_votes = 'select id_vote, count(*) as nb_votes from (select id_user, id_vote from user_choice join choices on id_choice = choices.id group by id_user, id_vote) group by id_vote' basequery = 'select * from (' + basequery + ') left join (' + nb_votes + ') on id = id_vote' - basequery = 'select *, votes.id as voteid, groups.name as groupname from (' + basequery + ') as votes join groups on groups.id = id_group where is_open=1' + basequery = 'select *, votes.id as voteid, groups.name as groupname, users.name as author from (' + basequery + ') as votes join groups on groups.id = id_group join users on users.id = id_author where is_open=1' if votes == 'all': votes = query_db(basequery + ' order by date_end') elif votes == 'archive': diff --git a/templates/vote.html b/templates/vote.html index a40fac2..cbe59f4 100644 --- a/templates/vote.html +++ b/templates/vote.html @@ -100,7 +100,7 @@ {% endif %}
-
Publié par
maethor +
Publié par
{{ vote.author }}
Début le
{{ vote.date_begin }}
Deadline le
{{ vote.date_end }}
Groupe
{{ vote.groupname }} -- 2.20.1