Mercurial > public > sg101
diff gpp/templates/polls/poll.html @ 440:ac9217eef610
Added total vote information to the poll templates. Cache the total votes in the model instance.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 21 May 2011 20:35:02 +0000 |
parents | 1f139de929c4 |
children |
line wrap: on
line diff
--- a/gpp/templates/polls/poll.html Sat May 21 19:55:48 2011 +0000 +++ b/gpp/templates/polls/poll.html Sat May 21 20:35:02 2011 +0000 @@ -15,7 +15,8 @@ {% endif %} {% get_comment_count for poll as comment_count %} <p> -This poll has <a href="{% url 'polls.views.poll_results' poll.id %}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>. +This poll has {{ poll.total_votes }} vote{{ poll.total_votes|pluralize }} and +<a href="{% url 'polls.views.poll_results' poll.id %}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>. {% if poll.is_open %} Voting for this poll started on {{ poll.start_date|date:"F d, Y" }}. {% if poll.end_date %}