summaryrefslogtreecommitdiffstats
path: root/parsers/people.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-04-13 01:13:08 +0100
committerPhilip Sargent <philip.sargent@klebos.com>2021-04-13 01:13:08 +0100
commit267741fa8b304112d96842118bc6c3ae335500f7 (patch)
treef6652511b6723c393c822686afc97d71f7bcc022 /parsers/people.py
parent7bc73d1ca8aae35d01848418ff76ba60fb2cea66 (diff)
downloadtroggle-267741fa8b304112d96842118bc6c3ae335500f7.tar.gz
troggle-267741fa8b304112d96842118bc6c3ae335500f7.tar.bz2
troggle-267741fa8b304112d96842118bc6c3ae335500f7.zip
fixing typos and changes in importing
Diffstat (limited to 'parsers/people.py')
-rw-r--r--parsers/people.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/parsers/people.py b/parsers/people.py
index ecc9272..345210c 100644
--- a/parsers/people.py
+++ b/parsers/people.py
@@ -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 = [ ]