1
I am trying to give a Slug in a given, I tried to use Lower and replace to swap some characters, my query is similar to this:
return Person.query.get(person_id).name.filter(func.lower(func.replace(Person.name, "ç", "c"))
works, but if I get something like 'á'
, or some other special character, it breaks, obviously.
What’s the way around it, make a list of all the characters with the index to give an replace? something like that?