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:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user