bakery/bakery.py
def slugify(text, delim=u'-'):
    """Generates an slightly worse ASCII-only slug."""
    if type(text) == str:
        text = unicode(text)
    result = []
    for word in _punct_re.split(text.lower()):
        word = normalize('NFKD', word).encode('ascii', 'ignore')
        if word:
            result.append(word)
    return unicode(delim.join(result))
Generates an slightly worse ASCII-only slug.
Generates an slightly worse ASCII-only slug.
Generates an slightly worse ASCII - only slug .
def slugify(text, delim=u'-'):
    if type(text) == str:
        text = unicode(text)
    result = []
    for word in _punct_re.split(text.lower()):
        word = normalize('NFKD', word).encode('ascii', 'ignore')
        if word:
            result.append(word)
    return unicode(delim.join(result))
def slugify ( text , delim = u'-' ) : if type ( text ) == str : text = unicode ( text ) result = [ ] for word in _punct_re . split ( text . lower ( ) ) : word = normalize ( 'NFKD' , word ) . encode ( 'ascii' , 'ignore' ) if word : result . append ( word ) return unicode ( delim . join ( result ) )
Generates an slightly worse ASCII-only slug.
Generates an slightly worse ASCII - only slug .
"""Generates an slightly worse ASCII-only slug."""
text
delim