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