annotate gpp/templates/polls/poll_vote.html @ 540:51fa1e0ca218

For #243, create a contests application.
author Brian Neal <bgneal@gmail.com>
date Mon, 09 Jan 2012 01:13:08 +0000
parents 8f46ba2f1b81
children
rev   line source
gremmie@1 1 {% extends 'base.html' %}
bgneal@310 2 {% load url from future %}
gremmie@1 3 {% block title %}Polls: {{ poll.question }}{% endblock %}
gremmie@1 4 {% block custom_css %}
bgneal@312 5 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/polls.css" />
gremmie@1 6 {% endblock %}
gremmie@1 7 {% block content %}
gremmie@1 8 <h2>Poll</h2>
bgneal@439 9 <h3>Voting Booth: {{ poll.question }}</h3>
bgneal@439 10 {% if user_choice %}
bgneal@439 11 <p>You voted for &quot;{{ user_choice.choice }}&quot;.</p>
bgneal@439 12 <form action="{% url 'polls-delete_vote' %}" method="post">{% csrf_token %}
gremmie@1 13 <div class="poll-form">
bgneal@439 14 <input type="hidden" name="poll_id" value="{{ poll.id }}" />
bgneal@439 15 <input type="submit" value="Delete My Vote!" />
gremmie@1 16 </div>
gremmie@1 17 </form>
bgneal@439 18 {% else %}
bgneal@439 19 <form action="." method="post">{% csrf_token %}
bgneal@439 20 <div class="poll-form">
bgneal@439 21 {{ vote_form.as_p }}
bgneal@439 22 <input type="submit" value="Vote" />
bgneal@439 23 </div>
bgneal@439 24 </form>
bgneal@439 25 {% endif %}
gremmie@1 26 <p class="poll-nav">
bgneal@447 27 <a href="{{ poll.get_absolute_url }}">View results</a>
bgneal@447 28 | <a href="{% url 'polls-main' %}">All polls</a>
gremmie@1 29 </p>
gremmie@1 30 <p>This poll was published on {{ poll.start_date|date:"F d, Y" }}.</p>
gremmie@1 31 {% endblock %}