From a2c13df57f2db1721c656200c1c37cf0e52b22c9 Mon Sep 17 00:00:00 2001 From: Matt Burke Date: Mon, 8 Jul 2019 00:11:27 -0400 Subject: [PATCH] Add dashboard sort clauses: first name and id I have seen the dashboard sorting be inconsistent. Last name then first name then id should produce a consistent and predictable sort order. --- dashboard/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard/views.py b/dashboard/views.py index 5a713099..b67c59c3 100644 --- a/dashboard/views.py +++ b/dashboard/views.py @@ -29,7 +29,8 @@ class Dashboard(LoginRequiredMixin, TemplateView): def get_context_data(self, **kwargs): context = super(Dashboard, self).get_context_data(**kwargs) - context['objects'] = Child.objects.all().order_by('last_name') + context['objects'] = Child.objects.all() \ + .order_by('last_name', 'first_name', 'id') return context