Order tickets in account page.
This commit is contained in:
parent
b7feb96c9b
commit
5d3cfe6210
|
@ -23,9 +23,13 @@
|
||||||
Checked in
|
Checked in
|
||||||
<th>
|
<th>
|
||||||
Actions
|
Actions
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for ticket in tickets %}
|
{% for ticket in tickets %}
|
||||||
|
{% ifchanged ticket.ticket_type.camp %}
|
||||||
|
<tr>
|
||||||
|
<td colspan="5">
|
||||||
|
<strong>{{ ticket.ticket_type.camp }}</strong>
|
||||||
|
{% endifchanged %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{% if ticket.name %}
|
{% if ticket.name %}
|
||||||
|
|
|
@ -19,7 +19,7 @@ class ShopTicketListView(LoginRequiredMixin, ListView):
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
tickets = super(ShopTicketListView, self).get_queryset()
|
tickets = super(ShopTicketListView, self).get_queryset()
|
||||||
user = self.request.user
|
user = self.request.user
|
||||||
return tickets.filter(order__user=user)
|
return tickets.filter(order__user=user).order_by("ticket_type__camp")
|
||||||
|
|
||||||
|
|
||||||
class ShopTicketDownloadView(LoginRequiredMixin, SingleObjectMixin, View):
|
class ShopTicketDownloadView(LoginRequiredMixin, SingleObjectMixin, View):
|
||||||
|
|
Loading…
Reference in a new issue