From 609904c279e9f98cd61d502864697a3657b6d52f Mon Sep 17 00:00:00 2001 From: Grizzly Date: Thu, 11 Jul 2019 08:00:49 +0000 Subject: [PATCH] Ordonancement des tickets par date --- tickets/views.py | 2 +- users/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tickets/views.py b/tickets/views.py index 98a9518d..c6eccdd7 100644 --- a/tickets/views.py +++ b/tickets/views.py @@ -38,6 +38,6 @@ def aff_ticket(request,ticketid): def aff_tickets(request): """ Vue d'affichage de tout les tickets """ - tickets = Ticket.objects.all() + tickets = Ticket.objects.all().order_by('date') return render(request,'tickets/index.html', {'tickets_list':tickets}) diff --git a/users/views.py b/users/views.py index ca95e584..4bed47f4 100644 --- a/users/views.py +++ b/users/views.py @@ -978,7 +978,7 @@ def profil(request, users, **_kwargs): request.GET.get('order'), SortTable.MACHINES_INDEX ) - tickets = Ticket.objects.filter(user=users).all() + tickets = Ticket.objects.filter(user=users).all().order_by('date') nb_tickets = tickets.count() pagination_large_number = GeneralOption.get_cached_value( 'pagination_large_number'