src/pyams_utils/url.py
changeset 401 6088cc1f4ed2
parent 398 f87a8558edcc
child 406 712193992d46
equal deleted inserted replaced
400:c4348fb13621 401:6088cc1f4ed2
    29 
    29 
    30     The original title is translated to remove accents, converted to lowercase, and words
    30     The original title is translated to remove accents, converted to lowercase, and words
    31     shorter than three characters are removed; terms are joined by hyphens.
    31     shorter than three characters are removed; terms are joined by hyphens.
    32     """
    32     """
    33     return '-'.join(filter(lambda x: len(x) >= min_word_length,
    33     return '-'.join(filter(lambda x: len(x) >= min_word_length,
    34                            translate_string(title, escape_slashes=False, force_lower=True,
    34                            translate_string(title.replace('/', '-'), escape_slashes=False,
    35                                             spaces='-', remove_punctuation=True,
    35                                             force_lower=True, spaces='-', remove_punctuation=True,
    36                                             keep_chars='-').replace('/', '-').split('-')))
    36                                             keep_chars='-').split('-')))
    37 
    37 
    38 
    38 
    39 #
    39 #
    40 # Request display context
    40 # Request display context
    41 #
    41 #