Mercurial > public > sg101
comparison gpp/templates/polls/poll.html @ 310:daa2916f5b34
Fixing 145; New url tag behavior (forwards compatibility) in Django 1.3.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 20 Jan 2011 04:03:48 +0000 |
parents | dbd703f7d63a |
children | 1f139de929c4 |
comparison
equal
deleted
inserted
replaced
309:8a0bae48b6ca | 310:daa2916f5b34 |
---|---|
1 {% extends 'base.html' %} | 1 {% extends 'base.html' %} |
2 {% load url from future %} | |
2 {% load comment_tags %} | 3 {% load comment_tags %} |
3 {% block title %}Polls: {{ poll.question }}{% endblock %} | 4 {% block title %}Polls: {{ poll.question }}{% endblock %} |
4 {% block content %} | 5 {% block content %} |
5 <h2>Poll</h2> | 6 <h2>Poll</h2> |
6 <h3>{{ poll.question }}</h3> | 7 <h3>{{ poll.question }}</h3> |
9 <li>{{ choice.choice }}</li> | 10 <li>{{ choice.choice }}</li> |
10 {% endfor %} | 11 {% endfor %} |
11 </ul> | 12 </ul> |
12 {% get_comment_count for poll as comment_count %} | 13 {% get_comment_count for poll as comment_count %} |
13 <p> | 14 <p> |
14 This poll has <a href="{% url polls.views.poll_results poll.id %}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>. | 15 This poll has <a href="{% url 'polls.views.poll_results' poll.id %}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>. |
15 {% if poll.is_open %} | 16 {% if poll.is_open %} |
16 Voting for this poll started on {{ poll.start_date|date:"F d, Y" }}. | 17 Voting for this poll started on {{ poll.start_date|date:"F d, Y" }}. |
17 {% if poll.end_date %} | 18 {% if poll.end_date %} |
18 Voting will end on {{ poll.end_date|date:"F d, Y" }}. | 19 Voting will end on {{ poll.end_date|date:"F d, Y" }}. |
19 {% endif %} | 20 {% endif %} |
20 {% else %} | 21 {% else %} |
21 This poll ran from {{ poll.start_date|date:"F d, Y" }} to {{ poll.end_date|date:"F d, Y" }}. | 22 This poll ran from {{ poll.start_date|date:"F d, Y" }} to {{ poll.end_date|date:"F d, Y" }}. |
22 {% endif %} | 23 {% endif %} |
23 </p> | 24 </p> |
24 <p class="poll-nav"> | 25 <p class="poll-nav"> |
25 <a href="{% url polls.views.poll_results poll.id %}">View Results & Comments</a> | 26 <a href="{% url 'polls.views.poll_results' poll.id %}">View Results & Comments</a> |
26 {% if poll.is_open and user.is_authenticated %} | 27 {% if poll.is_open and user.is_authenticated %} |
27 | <a href="{% url polls.views.poll_vote poll_id=poll.id %}">Vote</a> | 28 | <a href="{% url 'polls.views.poll_vote' poll_id=poll.id %}">Vote</a> |
28 {% endif %} | 29 {% endif %} |
29 | <a href="{% url polls.views.poll_index %}">Poll Index</a> | 30 | <a href="{% url 'polls.views.poll_index' %}">Poll Index</a> |
30 </p> | 31 </p> |
31 {% endblock %} | 32 {% endblock %} |