summaryrefslogtreecommitdiffstats
path: root/parsers/people.py
diff options
context:
space:
mode:
authorRad <radost.waszkiewicz@gmail.com>2019-02-27 22:29:45 +0000
committerRad <radost.waszkiewicz@gmail.com>2019-02-27 22:29:45 +0000
commitce268ec306946e4f4aadd8ee358a28e79f22b9b3 (patch)
tree78feffcf35678d76afb7b2e9929f3c4eb2ac993a /parsers/people.py
parent7e1aa80551004c88bccc599cf807f67904976589 (diff)
downloadtroggle-ce268ec306946e4f4aadd8ee358a28e79f22b9b3.tar.gz
troggle-ce268ec306946e4f4aadd8ee358a28e79f22b9b3.tar.bz2
troggle-ce268ec306946e4f4aadd8ee358a28e79f22b9b3.zip
working on rebuilding everything
Diffstat (limited to 'parsers/people.py')
-rw-r--r--parsers/people.py33
1 files changed, 1 insertions, 32 deletions
diff --git a/parsers/people.py b/parsers/people.py
index bc18472..4dba3a8 100644
--- a/parsers/people.py
+++ b/parsers/people.py
@@ -62,8 +62,6 @@ def LoadPersonsExpos():
# make persons
print "Loading personexpeditions"
- #expoers2008 = """Edvin Deadman,Kathryn Hopkins,Djuke Veldhuis,Becka Lawson,Julian Todd,Natalie Uomini,Aaron Curtis,Tony Rooke,Ollie Stevens,Frank Tully,Martin Jahnke,Mark Shinwell,Jess Stirrups,Nial Peters,Serena Povia,Olly Madge,Steve Jones,Pete Harley,Eeva Makiranta,Keith Curtis""".split(",")
- #expomissing = set(expoers2008)
for personline in personreader:
name = personline[header["Name"]]
@@ -85,36 +83,7 @@ def LoadPersonsExpos():
nonLookupAttribs = {'nickname':nickname, 'is_guest':(personline[header["Guest"]] == "1")}
save_carefully(models.PersonExpedition, lookupAttribs, nonLookupAttribs)
-
- # this fills in those people for whom 2008 was their first expo
- #print "Loading personexpeditions 2008"
- #for name in expomissing:
- # firstname, lastname = name.split()
- # is_guest = name in ["Eeva Makiranta", "Keith Curtis"]
- # print "2008:", name
- # persons = list(models.Person.objects.filter(first_name=firstname, last_name=lastname))
- # if not persons:
- # person = models.Person(first_name=firstname, last_name = lastname, is_vfho = False, mug_shot = "")
- # #person.Sethref()
- # person.save()
- # else:
- # person = persons[0]
- # expedition = models.Expedition.objects.get(year="2008")
- # personexpedition = models.PersonExpedition(person=person, expedition=expedition, nickname="", is_guest=is_guest)
- # personexpedition.save()
-
- #Notability is now a method of person. Makes no sense to store it in the database; it would need to be recalculated every time something changes. - AC 16 Feb 09
- # could rank according to surveying as well
- #print "Setting person notability"
- #for person in models.Person.objects.all():
- #person.notability = 0.0
- #for personexpedition in person.personexpedition_set.all():
- #if not personexpedition.is_guest:
- #person.notability += 1.0 / (2012 - int(personexpedition.expedition.year))
- #person.bisnotable = person.notability > 0.3 # I don't know how to filter by this
- #person.save()
-
-
+
# used in other referencing parser functions
# expedition name lookup cached for speed (it's a very big list)
Gpersonexpeditionnamelookup = { }