From a786f4813fe50dd3b7603e94ffdfd9f5bb1d64df Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sun, 15 Oct 2023 18:39:00 +0300 Subject: tidying --- core/views/caves.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'core/views/caves.py') diff --git a/core/views/caves.py b/core/views/caves.py index 90a8451..bd559bb 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -125,17 +125,19 @@ def getnotablecaves(): def caveindex(request): - #allcaves = Cave.objects.all() - allcaves = Cave.objects.filter(areacode="1626") # testing with subset - for c in allcaves: - if c.entrances: - pass + """Should use Django order-by for lazy sorting, not here. But only after we have a proper slug system in place for Caves + """ + # allcaves = Cave.objects.all() + # for c in allcaves: + # if c.entrances: + # pass caves1623 = list(Cave.objects.filter(areacode="1623")) caves1624 = list(Cave.objects.filter(areacode="1624")) caves1626 = list(Cave.objects.filter(areacode="1626")) caves1627 = list(Cave.objects.filter(areacode="1627")) caves1623.sort(key=caveKey) + caves1624.sort(key=caveKey) caves1626.sort(key=caveKey) caves1627.sort(key=caveKey) return render( -- cgit v1.2.3