Loading django/template/defaultfilters.py +3 −3 Original line number Diff line number Diff line Loading @@ -228,9 +228,9 @@ def make_list(value): @stringfilter def slugify(value): """ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. Converts to ASCII. Converts spaces to hyphens. Removes characters that aren't alphanumerics, underscores, or hyphens. Converts to lowercase. Also strips leading and trailing whitespace. """ return _slugify(value) Loading django/utils/text.py +3 −3 Original line number Diff line number Diff line Loading @@ -438,9 +438,9 @@ unescape_string_literal = allow_lazy(unescape_string_literal) def slugify(value): """ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. Converts to ASCII. Converts spaces to hyphens. Removes characters that aren't alphanumerics, underscores, or hyphens. Converts to lowercase. Also strips leading and trailing whitespace. """ value = force_text(value) value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii') Loading docs/ref/templates/builtins.txt +3 −3 Original line number Diff line number Diff line Loading @@ -2024,9 +2024,9 @@ If ``some_list`` is ``['a', 'b', 'c']``, the output will be ``['a', 'b']``. slugify ^^^^^^^ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. Converts to ASCII. Converts spaces to hyphens. Removes characters that aren't alphanumerics, underscores, or hyphens. Converts to lowercase. Also strips leading and trailing whitespace. For example:: Loading docs/ref/utils.txt +3 −3 Original line number Diff line number Diff line Loading @@ -842,9 +842,9 @@ appropriate entities. .. function:: slugify Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. Converts to ASCII. Converts spaces to hyphens. Removes characters that aren't alphanumerics, underscores, or hyphens. Converts to lowercase. Also strips leading and trailing whitespace. For example:: Loading Loading
django/template/defaultfilters.py +3 −3 Original line number Diff line number Diff line Loading @@ -228,9 +228,9 @@ def make_list(value): @stringfilter def slugify(value): """ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. Converts to ASCII. Converts spaces to hyphens. Removes characters that aren't alphanumerics, underscores, or hyphens. Converts to lowercase. Also strips leading and trailing whitespace. """ return _slugify(value) Loading
django/utils/text.py +3 −3 Original line number Diff line number Diff line Loading @@ -438,9 +438,9 @@ unescape_string_literal = allow_lazy(unescape_string_literal) def slugify(value): """ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. Converts to ASCII. Converts spaces to hyphens. Removes characters that aren't alphanumerics, underscores, or hyphens. Converts to lowercase. Also strips leading and trailing whitespace. """ value = force_text(value) value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii') Loading
docs/ref/templates/builtins.txt +3 −3 Original line number Diff line number Diff line Loading @@ -2024,9 +2024,9 @@ If ``some_list`` is ``['a', 'b', 'c']``, the output will be ``['a', 'b']``. slugify ^^^^^^^ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. Converts to ASCII. Converts spaces to hyphens. Removes characters that aren't alphanumerics, underscores, or hyphens. Converts to lowercase. Also strips leading and trailing whitespace. For example:: Loading
docs/ref/utils.txt +3 −3 Original line number Diff line number Diff line Loading @@ -842,9 +842,9 @@ appropriate entities. .. function:: slugify Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. Converts to ASCII. Converts spaces to hyphens. Removes characters that aren't alphanumerics, underscores, or hyphens. Converts to lowercase. Also strips leading and trailing whitespace. For example:: Loading