Opened 10 years ago

Closed 10 years ago

Last modified 9 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: UI/UX:

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 Changed 10 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 10 years ago by jacob

  • Status changed from new to assigned

comment:3 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in [597].

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