Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #299 -- Slugify no longer removes hyphens. Thanks,

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 254f31819bb47eb23ea4f163154a55e80e2478a9 1 parent 151bf05
@adrianholovaty adrianholovaty authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 django/core/
6 django/core/
@@ -54,15 +54,15 @@ def make_list(value, _):
def slugify(value, _):
"Converts to lowercase, removes non-alpha chars and converts spaces to hyphens"
- value = re.sub('[^\w\s]', '', value).strip().lower()
+ value = re.sub('[^\w\s-]', '', value).strip().lower()
return re.sub('\s+', '-', value)
def stringformat(value, arg):
Formats the variable according to the argument, a string formatting specifier.
This specifier uses Python string formating syntax, with the exception that
the leading "%" is dropped.
See for documentation
of Python string formatting
Please sign in to comment.
Something went wrong with that request. Please try again.