Skip to content

Commit 36ad773

Browse files
committed
Update utils.py
Fix stugily to support text like é.
1 parent fb82df1 commit 36ad773

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

smartdispatch/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def slugify(value):
5757
---------
5858
https://github.com/django/django/blob/1.7c3/django/utils/text.py#L436
5959
"""
60-
value = unicodedata.normalize('NFKD', unicode(value)).encode('ascii', 'ignore').decode('ascii')
60+
value = unicodedata.normalize('NFKD', unicode(value, "UTF-8")).encode('ascii', 'ignore').decode('ascii')
6161
value = re.sub('[^\w\s-]', '', value).strip().lower()
6262
return str(re.sub('[-\s]+', '_', value))
6363

0 commit comments

Comments
 (0)