summaryrefslogtreecommitdiff
path: root/docs/ref/utils.txt
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2020-05-26 22:56:41 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-29 06:47:51 +0200
commit0382ecfe020b4c51b4c01e4e9a21892771e66941 (patch)
treedd02f774b9f3d5df56053516b019d77852ccb491 /docs/ref/utils.txt
parent3111b434e76e68a0c1bdb0e3f0c599b249b173ad (diff)
Fixed #28694 -- Made django.utils.text.slugify() strip dashes and underscores.
Diffstat (limited to 'docs/ref/utils.txt')
-rw-r--r--docs/ref/utils.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index dcc354e2e2..921aba5de8 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -853,8 +853,8 @@ appropriate entities.
#. Converting to lowercase.
#. Removing characters that aren't alphanumerics, underscores, hyphens, or
whitespace.
- #. Removing leading and trailing whitespace.
#. Replacing any whitespace or repeated dashes with single dashes.
+ #. Removing leading and trailing whitespace, dashes, and underscores.
For example::
@@ -867,6 +867,11 @@ appropriate entities.
>>> slugify('你好 World', allow_unicode=True)
'你好-world'
+ .. versionchanged:: 3.2
+
+ In older versions, leading and trailing dashes and underscores are not
+ removed.
+
.. _time-zone-selection-functions:
``django.utils.timezone``