2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 23:17:05 +00:00

[svn] merge the trip table to have surveys by date

Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8221 by julian @ 1/24/2009 2:01 PM
This commit is contained in:
substantialnoninfringinguser
2009-05-13 05:43:20 +01:00
parent 6598dd5105
commit 60735a9b3a
8 changed files with 139 additions and 39 deletions

View File

@@ -262,3 +262,21 @@ for line in caveReader :
newCaveAndEntrance = models.CaveAndEntrance(cave = newCave, entrance = newEntrance, entrance_letter = entrance_letter)
newCaveAndEntrance.save()
# lookup function modelled on GetPersonExpeditionNameLookup
Gcavelookup = None
def GetCaveLookup():
global Gcavelookup
if Gcavelookup:
return Gcavelookup
Gcavelookup = {"NONEPLACEHOLDER":None}
for cave in models.Cave.objects.all():
Gcavelookup[cave.official_name.lower()] = cave
if cave.kataster_number:
Gcavelookup[cave.kataster_number] = cave
if cave.unofficial_number:
Gcavelookup[cave.unofficial_number] = cave
return Gcavelookup