Snippets

Sergey Prymak create slug from Unicode string

Created by Sergey Prymak
1
2
3
4
5
6
import six
from django.utils.text import slugify
from unidecode import unidecode

def create_slug(title):
    return slugify(six.text_type(unidecode(title)))

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.