Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#287 closed defect (fixed)

slugify description incorrect

Reported by: emccoy@… Owned by: Jacob
Component: Documentation Version:
Severity: minor Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The documentation for sluguify says it removes "non-alpha" characters. It actually removes non-word characters, according to the PCRE definition of "word" (alphanumeric plus underscore). I confirmed this by looking at the source for slugify. The docs should be updated to note what slugify actually does. It seems rational to allow numbers in slugs, so this is not a suggestion to change the behavior of the function.

You may also want to note in the documentation that slugify strips leading and trailing whitespace. It's not likely to affect anyone, but it could be important for somebody.

Change History (3)

comment:1 Changed 14 years ago by Manuzhai

I've added a custom SlugField to my Django, and I've talked about this stuff with jacobkm. We agreed that it would be nice to have some options to the SlugField to customize how exactly it's built.

comment:2 Changed 14 years ago by Jacob

Status: newassigned

comment:3 Changed 14 years ago by Adrian Holovaty

Resolution: fixed
Status: assignedclosed

Fixed in [597].

Note: See TracTickets for help on using tickets.
Back to Top