Code cleanup for Python 3.

This commit is contained in:
Josh Washburne 2018-01-06 13:11:51 -05:00
parent 037dd98b49
commit 6b93fc5f6c

View file

@ -65,7 +65,7 @@ def naturalize(text):
https://github.com/nathforge/django-naturalsortfield
"""
def naturalize_int_match(match):
return '%08d' % (int(match.group(0)),)
return '{:08d}'.format(int(match.group(0)))
text = normalize('NFKD', text).encode('ascii', 'ignore').decode('ascii')
text = text.lower()