X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=main.py;h=da9316bbf7c53a9024aea144e33ac6b432808681;hb=af86f1aa2f19d4ebb51217983eb6935befe595ed;hp=956e438727ff40728c8a4e69278057d242fce453;hpb=3c19321cfaca486ce5a3b7c68a58e9c1dfceefa2;p=cavote.git diff --git a/main.py b/main.py index 956e438..da9316b 100755 --- a/main.py +++ b/main.py @@ -124,7 +124,7 @@ def password_lost(): "From: %s" % EMAIL, "To: %s" % user['email'], "Subject: [Cavote] Password lost", - "Date: %s" % time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()), + "Date: %s" % time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()).decode('utf-8'), "X-Mailer: %s" % VERSION, "", "You have lost your password.", @@ -254,7 +254,7 @@ def admin_user_add(): "From: %s" % EMAIL, "To: %s" % user['email'], "Subject: [Cavote] Welcome", - "Date: %s" % time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()), + "Date: %s" % time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()).decode('utf-8'), "X-Mailer: %s" % VERSION, "", "Hi %s!" % user['name'], @@ -432,7 +432,7 @@ def has_voted(idvote, iduser=-1): @app.route('/vote/', methods=['GET', 'POST']) def vote(idvote): - vote = query_db('select votes.*, groups.name as groupname from votes join groups on groups.id=votes.id_group where votes.id=?', [idvote], one=True) + vote = query_db('select votes.*, groups.name as groupname, users.name as author from votes join groups on groups.id=votes.id_group join users on users.id = id_author where votes.id=?', [idvote], one=True) if vote is None: abort(404) if can_see_vote(idvote, get_userid()):