show if a ticket is used or not

This commit is contained in:
Thomas Steen Rasmussen 2017-04-02 21:40:44 +02:00
parent 39b2963b18
commit 3f69d8521e
2 changed files with 9 additions and 1 deletions

View file

@ -14,7 +14,7 @@
<div class="col-md-7">
<div class="pull-right">
<h2>{{ ticket.order.camp }}</h2>
<h2>{% if ticket.checked_in %}This ticket has been used{% else %}This ticket is unused{% endif %}</h2>
<form method="POST" class="form">
{% csrf_token %}
{% bootstrap_field form.name %}

View file

@ -14,6 +14,8 @@
Product name
<th>
Price
<th>
Checked in
<tbody>
{% for ticket in tickets %}
@ -33,6 +35,12 @@
</a>
<td>
{{ ticket.product.price|currency }}
<td>
{% if ticket.checked_in %}
Yes
{% else %}
Not yet
{% endif %}
{% endfor %}
</table>