summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/utils.txt7
-rw-r--r--docs/releases/3.2.txt3
2 files changed, 9 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``
diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt
index a869eb49cf..5436726fa4 100644
--- a/docs/releases/3.2.txt
+++ b/docs/releases/3.2.txt
@@ -280,6 +280,9 @@ Miscellaneous
* :attr:`.ModelAdmin.prepopulated_fields` no longer strips English stop words,
such as ``'a'`` or ``'an'``.
+* :func:`~django.utils.text.slugify` now removes leading and trailing dashes
+ and underscores.
+
.. _deprecated-features-3.2:
Features deprecated in 3.2