From bad25812ed991cc1fcd4ad58c74430fc2748a50f Mon Sep 17 00:00:00 2001 From: iou1name Date: Mon, 16 Jul 2018 12:11:19 -0400 Subject: [PATCH] refactor --- templates/quest.html | 6 ++++-- views.py | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/quest.html b/templates/quest.html index 72d204c..95e2be2 100644 --- a/templates/quest.html +++ b/templates/quest.html @@ -253,15 +253,17 @@ - {% for option in quest_post[0]|get_options %} + {% for option in options %} + {% if option[1] == quest_post[0] %} {{ option[2] }} - {{ option[0]|num_votes }} + 0 + {% endif %} {% endfor %} {% endif %} diff --git a/views.py b/views.py index 77083cc..e232784 100644 --- a/views.py +++ b/views.py @@ -59,10 +59,8 @@ def quest(quest_title): open_post_id = data[4] quest_posts = db.get_quest_data(quest_id) - #dice_rolls = db.get_dice_rolls(quest_id) - #polls = db.get_polls(quest_id) - #polls = {poll[0]: poll[1:] for poll in polls} - + dice_rolls = db.get_dice_rolls(quest_id) + options = db.get_poll_options(quest_id=quest_id) messages = db.get_chat_messages(quest_id) temp = render_template('quest.html', **locals())