def slugify(s): """Fix Django's slugify with some transliterations before slugifying.""" tr = {'ü': 'ue', 'Ü': 'ue', 'ö': 'oe', 'Ö': 'Oe', 'ä': 'ae', 'Ä': 'Ae', 'ß': 'ss', '_': '-', } for k, v in tr.items(): s = s.replace(k, v) return dj_slugify(s)
def slugify(s): return re.sub('[^A-Za-z0-9]+', '-', dj_slugify(s))
def slugify(value): value = encoding.smart_unicode(value) return dj_slugify(encoding.smart_unicode(unidecode.unidecode(value)))
def slugify_a_z(s): # Converts none ascii alpha into ascii and then removes anything else. return re.sub('[^a-z]+', '', dj_slugify(s))