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