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

WORKING both py3.9.10 & 3.8.10 (dj2.2.25)

This commit is contained in:
Philip Sargent
2022-03-02 23:19:48 +00:00
parent 73b26ec206
commit 02d58d440e
4 changed files with 15 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
import csv, re, datetime, os, shutil
from html.parser import HTMLParser
from html import unescape
from unidecode import unidecode
from pathlib import Path
@@ -141,12 +141,11 @@ def GetPersonExpeditionNameLookup(expedition):
#print("Calculating GetPersonExpeditionNameLookup for " + expedition.year)
personexpeditions = PersonExpedition.objects.filter(expedition=expedition)
htmlparser = HTMLParser()
for personexpedition in personexpeditions:
possnames = [ ]
f = unidecode(htmlparser.unescape(personexpedition.person.first_name.lower()))
l = unidecode(htmlparser.unescape(personexpedition.person.last_name.lower()))
full = unidecode(htmlparser.unescape(personexpedition.person.fullname.lower()))
f = unidecode(unescape(personexpedition.person.first_name.lower()))
l = unidecode(unescape(personexpedition.person.last_name.lower()))
full = unidecode(unescape(personexpedition.person.fullname.lower()))
if l:
possnames.append(f + " " + l)
possnames.append(f + " " + l[0])