Skip to content

Commit

Permalink
List usernames of voters
Browse files Browse the repository at this point in the history
  • Loading branch information
sometimesok committed Oct 17, 2020
1 parent f52d359 commit 9114b50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ISS/models/polls.py
Expand Up @@ -62,4 +62,4 @@ class Meta:
voter = models.ForeignKey(
'ISS.Poster',
null=False,
on_delete=models.CASCADE)
on_delete=models.CASCADE)
8 changes: 7 additions & 1 deletion ISS/templates/thread.html
Expand Up @@ -44,7 +44,7 @@ <h3 class="poll-prompt">
{% for opt, perc in thread.poll.get_vote_distribution_percentages.items %}
<li class="option">
<span class="option-label">
{{ opt.answer }}
{{ opt }}
</span>
<div class="vote-bar-container">
<div class="vote-bar" style="width: {{ perc }}%">
Expand All @@ -61,6 +61,12 @@ <h3 class="poll-prompt">
{% endif %}
</div>
</li>
{% for vote in opt.votes.all %}
{{vote.voter}}
{% if not forloop.last %}
,
{% endif %}
{% endfor %}
{% endfor %}
</ul>
{% if cast_vote_form %}
Expand Down

0 comments on commit 9114b50

Please sign in to comment.