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" %}