We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dde05e1 commit 3111b43Copy full SHA for 3111b43
django/utils/text.py
@@ -393,9 +393,10 @@ def unescape_string_literal(s):
393
@keep_lazy_text
394
def slugify(value, allow_unicode=False):
395
"""
396
- Convert to ASCII if 'allow_unicode' is False. Convert spaces to hyphens.
397
- Remove characters that aren't alphanumerics, underscores, or hyphens.
398
- Convert to lowercase. Also strip leading and trailing whitespace.
+ Convert to ASCII if 'allow_unicode' is False. Convert spaces or repeated
+ dashes to single dashes. Remove characters that aren't alphanumerics,
+ underscores, or hyphens. Convert to lowercase. Also strip leading and
399
+ trailing whitespace.
400
401
value = str(value)
402
if allow_unicode:
0 commit comments