mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 16:07:19 +00:00
fixing typos and changes in importing
This commit is contained in:
@@ -4,7 +4,7 @@ from unidecode import unidecode
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
import troggle.core.models as models
|
||||
from troggle.core.models.troggle import Expedition, Person, PersonExpedition
|
||||
from troggle.core.utils import save_carefully
|
||||
|
||||
'''These functions do not match how the stand-alone folk script works. So the script produces an HTML file which has
|
||||
@@ -50,7 +50,7 @@ def LoadPersonsExpos():
|
||||
lookupAttribs = {'year':year}
|
||||
nonLookupAttribs = {'name':"CUCC expo %s" % year}
|
||||
|
||||
save_carefully(models.Expedition, lookupAttribs, nonLookupAttribs)
|
||||
save_carefully(Expedition, lookupAttribs, nonLookupAttribs)
|
||||
|
||||
# make persons
|
||||
print(" - Loading personexpeditions")
|
||||
@@ -84,17 +84,17 @@ def LoadPersonsExpos():
|
||||
|
||||
lookupAttribs={'first_name':firstname, 'last_name':(lastname or "")}
|
||||
nonLookupAttribs={'is_vfho':vfho, 'fullname':fullname}
|
||||
person, created = save_carefully(models.Person, lookupAttribs, nonLookupAttribs)
|
||||
person, created = save_carefully(Person, lookupAttribs, nonLookupAttribs)
|
||||
|
||||
parseMugShotAndBlurb(personline=personline, header=header, person=person)
|
||||
|
||||
# make person expedition from table
|
||||
for year, attended in list(zip(headers, personline))[5:]:
|
||||
expedition = models.Expedition.objects.get(year=year)
|
||||
expedition = Expedition.objects.get(year=year)
|
||||
if attended == "1" or attended == "-1":
|
||||
lookupAttribs = {'person':person, 'expedition':expedition}
|
||||
nonLookupAttribs = {'nickname':nickname, 'is_guest':(personline[header["Guest"]] == "1")}
|
||||
save_carefully(models.PersonExpedition, lookupAttribs, nonLookupAttribs)
|
||||
save_carefully(PersonExpedition, lookupAttribs, nonLookupAttribs)
|
||||
|
||||
|
||||
# used in other referencing parser functions
|
||||
@@ -110,7 +110,7 @@ def GetPersonExpeditionNameLookup(expedition):
|
||||
duplicates = set()
|
||||
|
||||
#print("Calculating GetPersonExpeditionNameLookup for " + expedition.year)
|
||||
personexpeditions = models.PersonExpedition.objects.filter(expedition=expedition)
|
||||
personexpeditions = PersonExpedition.objects.filter(expedition=expedition)
|
||||
htmlparser = HTMLParser()
|
||||
for personexpedition in personexpeditions:
|
||||
possnames = [ ]
|
||||
|
||||
Reference in New Issue
Block a user