Opened 19 years ago

Closed 19 years ago

Last modified 18 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

Description

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 by Manuzhai, 19 years ago

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 by Jacob, 19 years ago

Status: newassigned

comment:3 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [597].

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