mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 11:28:23 +00:00
this year's cave list
This commit is contained in:
@@ -222,6 +222,21 @@ def caveindex(request):
|
||||
caves1624.sort(key=caveKey)
|
||||
caves1626.sort(key=caveKey)
|
||||
caves1627.sort(key=caveKey)
|
||||
|
||||
allcaves = caves1623 + caves1624 + caves1626 + caves1627
|
||||
caves_this_year = []
|
||||
for c in allcaves:
|
||||
if c.unofficial_number.startswith(current_expo()):
|
||||
caves_this_year.append(c)
|
||||
caves_this_year.sort(key=caveKey)
|
||||
|
||||
caves_last_year = []
|
||||
for c in allcaves:
|
||||
last_year = str(int(current_expo()) - 1)
|
||||
if c.unofficial_number.startswith(last_year):
|
||||
caves_last_year.append(c)
|
||||
caves_this_year.sort(key=caveKey)
|
||||
|
||||
return render(
|
||||
request,
|
||||
"caveindex.html",
|
||||
@@ -230,6 +245,8 @@ def caveindex(request):
|
||||
"caves1627": caves1627,
|
||||
"caves1624": caves1624,
|
||||
"notablecaves": getnotablecaves(),
|
||||
"caves_this_year": caves_this_year,
|
||||
"caves_last_year": caves_last_year,
|
||||
"cavepage": True, "year": current_expo()},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user