2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-28 02:01:51 +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

@ -51,7 +51,7 @@ class SimpleTest(SimpleTestCase):
def test_import_parsers_QMs(self):
from troggle.core.models.caves import QM, Cave, LogbookEntry
def test_import_parsers_people(self):
from html.parser import HTMLParser
from html import unescape
from unidecode import unidecode
def test_import_parsers_logbooks(self):
from django.template.defaultfilters import slugify

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])

10
requirements-p39.txt Normal file
View File

@ -0,0 +1,10 @@
asgiref==3.3.4
confusable-homoglyphs==3.2.0
coverage==5.5
Django==2.2.25
docutils==0.14
gunicorn==20.1.0
pytz==2019.1
sqlparse==0.2.4
typing-extensions==3.7.4.3
Unidecode==1.0.23

View File

@ -4,7 +4,6 @@ coverage==5.5
Django==2.2.25
docutils==0.14
gunicorn==20.1.0
Pillow==5.4.1
pytz==2019.1
sqlparse==0.2.4
typing-extensions==3.7.4.3