diff --git a/src/profiles/templates/tickets/ticket_list.html b/src/profiles/templates/tickets/ticket_list.html index c00a9a79..ee63ccd8 100644 --- a/src/profiles/templates/tickets/ticket_list.html +++ b/src/profiles/templates/tickets/ticket_list.html @@ -23,9 +23,13 @@ Checked in Actions - {% for ticket in tickets %} + {% ifchanged ticket.ticket_type.camp %} + + + {{ ticket.ticket_type.camp }} + {% endifchanged %} {% if ticket.name %} diff --git a/src/tickets/views.py b/src/tickets/views.py index 7641664d..5a41f47b 100644 --- a/src/tickets/views.py +++ b/src/tickets/views.py @@ -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):