(value)
return re.sub('[-\s]+', '-', value)
Normalizes string, converts to lowercase, removes non-alpha characters,
    and converts spaces to hyphens.
Normalizes string, converts to lowercase, removes non-alpha characters,
    and converts spaces to hyphens.
Normalizes string converts to lowercase removes non - alpha characters and converts spaces to hyphens .
def slugify(value):
    """
    Normalizes string, converts to lowercase, removes non-alpha characters,
    and converts spaces to hyphens.
    """
    value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
    value = unicode(re.sub('[^\w\s-]', '', value).strip().lower())
    return re.sub('[-\s]+', '-', value)
def slugify ( value ) : value = unicodedata . normalize ( 'NFKD' , value ) . encode ( 'ascii' , 'ignore' ) value = unicode ( re . sub ( '[^\w\s-]' , '' , value ) . strip ( ) . lower ( ) ) return re . sub ( '[-\s]+' , '-' , value )