diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-10-15 18:39:00 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-10-15 18:39:00 +0300 |
commit | a786f4813fe50dd3b7603e94ffdfd9f5bb1d64df (patch) | |
tree | 89586963ebd3d0a705f302b6a68198b1bfa29800 /core/views | |
parent | c51c2326feb2a05629ca720fed31740cf73a8aa3 (diff) | |
download | troggle-a786f4813fe50dd3b7603e94ffdfd9f5bb1d64df.tar.gz troggle-a786f4813fe50dd3b7603e94ffdfd9f5bb1d64df.tar.bz2 troggle-a786f4813fe50dd3b7603e94ffdfd9f5bb1d64df.zip |
tidying
Diffstat (limited to 'core/views')
-rw-r--r-- | core/views/caves.py | 12 |
1 files changed, 7 insertions, 5 deletions
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( |