You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
354 B

import seminar.models as m
from various.utils import bez_diakritiky_translate
import re
def normalizuj_jmeno(o: m.Osoba) -> str:
# FIXME: Možná není potřeba vázat na model?
cele_jmeno = f'{o.jmeno} {o.prijmeni}'
cele_jmeno = cele_jmeno.translate(bez_diakritiky_translate)
cele_jmeno = re.sub(r'[^a-zA-Z- ]', '', cele_jmeno)
return cele_jmeno