refactor
This commit is contained in:
parent
e64bd60f3f
commit
bad25812ed
|
@ -253,15 +253,17 @@
|
|||
<col{% if quest_post[0] != open_post_id %} style="visibility: collapse;"{% endif %}/>
|
||||
<col/>
|
||||
<col/>
|
||||
{% for option in quest_post[0]|get_options %}
|
||||
{% for option in options %}
|
||||
{% if option[1] == quest_post[0] %}
|
||||
<tr>
|
||||
<td class="pollCheckBox">
|
||||
<input type="checkbox" id="pollInput-{{ option[0] }}" onchange="pollVote({{ option[0] }})"/>
|
||||
<label for="pollInput-{{ option[0] }}"></label>
|
||||
</td>
|
||||
<td class="option_text">{{ option[2] }}</td>
|
||||
<td class="optionVotes">{{ option[0]|num_votes }}</td>
|
||||
<td class="optionVotes">0</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
|
6
views.py
6
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())
|
||||
|
|
Loading…
Reference in New Issue
Block a user