From 00f5ffa1b6b83dcdb0436f1f53e4516e15ed75e4 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Wed, 17 Jul 2024 14:05:58 +0200 Subject: [PATCH] re-order names --- core/views/logbooks.py | 2 +- templates/expedition.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/views/logbooks.py b/core/views/logbooks.py index 1bcf54d..b3f3176 100644 --- a/core/views/logbooks.py +++ b/core/views/logbooks.py @@ -116,7 +116,7 @@ def expedition(request, expeditionname): if issunday := (date.weekday() == 6): # WALRUS pcell["sunday"] = issunday prow.append(pcell) - personexpodays.append({"personexpedition": personexpedition, "personrow": prow}) + personexpodays.append({"personexpedition": personexpedition, "personrow": prow, "sortname": personexpedition.person.last_name}) ts[expeditionname] = { "year": int(expeditionname), diff --git a/templates/expedition.html b/templates/expedition.html index 0aa8d8c..33dcf91 100644 --- a/templates/expedition.html +++ b/templates/expedition.html @@ -44,7 +44,7 @@ an "S" for a survey trip. The colours of the "T" and "S" a {% endfor %} -{% for personexpoday in personexpodays %} +{% for personexpoday in personexpodays|dictsort:"sortname" %} {{personexpoday.personexpedition.person.fullname|safe}} {% for activities in personexpoday.personrow %}