Django has a function for this:
In [11]: from django.template.defaultfilters import slugify In [13]: slugify(u'รง รฉ YUOIYO ___ 89098') Out[13]: u'c-e-yuoiyo-___-89098'
But actually you better use the prepopulated_fields and SlugField parameter .
EDIT:
This seems to be a recurring question, and the answer suggested in another OP works quite well. Install unidecode first , then:
In [2]: import unidecode In [3]: unidecode.unidecode(u" ") Out[3]: 'Sain uu
You can pass it to slugify after.
If you are looking for slug south karakulera, you can use mozilla / unicode-slugify
In [1]: import slugify In [2]: slugify.slugify(u" ") Out[3]: u'\u0441\u0430\u0439\u043d-\u0443\u0443'
Result http://example.com/news/-
source share