2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

remove getqms

This commit is contained in:
Philip Sargent 2022-07-08 22:20:29 +03:00
parent 776f9f7833
commit a4b1c7b142

View File

@ -527,13 +527,13 @@ def qm(request,cave_id,qm_id,year,grade=None, blockname=None):
return render(request,'errors/badslug.html', {'badslug': f'{cave_id=} {year=} {qm_id=} {blockname=}'})
def get_qms(request, caveslug):
'''Does not crash, but just returns a text list of the entrances for a cave.
Used internally by the JSON export code? Archeology required..
cf get_entrances() above
'''
try:
cave = Cave.objects.get(caveslug__slug = caveslug)
except:
return render(request,'errors/badslug.html', {'badslug': caveslug})
return render(request,'options.html', {"items": [(q.slug(), q.slug()) for q in cave.QMs()]})
# def get_qms(request, caveslug):
# '''Does not crash, but just returns a text list of the entrances for a cave.
# Used internally by the JSON export code? Archeology required..
# cf get_entrances() above
# '''
# try:
# cave = Cave.objects.get(caveslug__slug = caveslug)
# except:
# return render(request,'errors/badslug.html', {'badslug': caveslug})
# return render(request,'options.html', {"items": [(q.slug(), q.slug()) for q in cave.QMs()]})