(value, separator)
return re.sub('[%s\s]+' % separator, separator, value)
Slugify a string, to make it URL friendly.
Slugify a string, to make it URL friendly.
Slugify a string to make it URL friendly .
def slugify(value, separator):
    """ Slugify a string, to make it URL friendly. """
    value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
    value = re.sub('[^\w\s-]', '', value.decode('ascii')).strip().lower()
    return re.sub('[%s\s]+' % separator, separator, value)
def slugify ( value , separator ) : value = unicodedata . normalize ( 'NFKD' , value ) . encode ( 'ascii' , 'ignore' ) value = re . sub ( '[^\w\s-]' , '' , value . decode ( 'ascii' ) ) . strip ( ) . lower ( ) return re . sub ( '[%s\s]+' % separator , separator , value )