From a5d0ad3e4f92147ea07a13e236389914ab4a57b7 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 23 Jan 2025 23:38:06 +0000 Subject: New User registration form --- parsers/people.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'parsers/people.py') diff --git a/parsers/people.py b/parsers/people.py index 96bda41..4a4512c 100644 --- a/parsers/people.py +++ b/parsers/people.py @@ -79,7 +79,8 @@ def troggle_slugify(longname): slug = slug.replace('ä', 'a') slug = slug.replace('&', '') # otherwise just remove the & slug = slug.replace(';', '') # otherwise just remove the ; - slug = re.sub(r'<[^>]*>','',slug) # remove + slug = slug.replace("'", "") # otherwise just remove the ', no O'Reilly problem # NEW + slug = re.sub(r'<[^>]*>','',slug) # remove and any HTML tags slug=slug.strip("-") # remove spare hyphens if len(slug) > 40: # slugfield is 50 chars @@ -120,9 +121,11 @@ def load_people_expos(): e = Expedition.objects.create(**otherAttribs, **coUniqueAttribs) print(" - Loading personexpeditions") - + for personline in personreader: # This is all horrible: refactor it. + # CSV: Name,Lastname,Guest,VfHO member,Mugshot,.. + # e.g: Olly Betts (Ol),Betts,,,l/ollybetts.htm, name = personline[header["Name"]] plainname = re.sub(r"<.*?>", "", name) # now in slugify -- cgit v1.2.3