Opened 17 years ago

Closed 6 years ago

#11157 closed Cleanup/optimization (fixed)

Allow stopwords in admin javascript URLify.

Reported by: keeperofkeys Owned by: Scott Cranfill
Component: contrib.admin Version: dev
Severity: Normal Keywords: slug
Cc: Scott Cranfill Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The javascript used by the admin to autogenerate slugs, URLify() in django.contrib.admin.media.js, removes certain words from the string before converting spaces to dashes. But django.template.defaultfilters.slugify leaves all words intact.

eg 'Working at home' -> 'working-home' using the admin js and 'working-at-home' using slugify.

Personally I prefer the latter but, whichever way round, the two filters ought to behave the same, as their functionality is meant to be interchangeable.

Change History (9)

comment:1 by Chris Beaven, 17 years ago

Resolution: → wontfix
Status: new → closed

Where does it say their functionality is meant to be interchangeable? I specifically remember Malcolm saying they weren't when closing a similar issue a long time back.

comment:2 by Adam Johnson, 6 years ago

Easy pickings: unset
Resolution: wontfix
Severity: → Normal
Status: closed → new
Triage Stage: Unreviewed → Accepted
Type: → Cleanup/optimization
UI/UX: unset
Version: 1.1-beta → master

After discussion on the mailing list ( ​https://groups.google.com/forum/#!msg/django-developers/9ayU7fTuuAM/tBDLzV5-DQAJ ) in favour of removing the english stopwords behaviour from the JavaScript slugify implementation, I'm reopening this.

The discussion originally created ticket #31511 that was closed as a duplicate of this one.

Scott Cranfill and Andy Chosak have a PR that was closed on #31511 that needs retargetting against this ticket and current master. ( ​https://github.com/django/django/pull/12785 )

comment:3 by Adam Johnson, 6 years ago

Owner: changed from nobody to Andy Chosak
Status: new → assigned

comment:4 by Mariusz Felisiak, 6 years ago

Summary: slugify and admin javascript URLify function produce different strings → Allow stopwords in admin javascript URLify.

comment:5 by Scott Cranfill, 6 years ago

Cc: Scott Cranfill added
Has patch: set
Owner: Andy Chosak removed
Status: assigned → new

comment:6 by Mariusz Felisiak, 6 years ago

Owner: set to Scott Cranfill
Status: new → assigned

comment:7 by Mariusz Felisiak, 6 years ago

Patch needs improvement: set

comment:8 by Mariusz Felisiak, 6 years ago

Patch needs improvement: unset
Triage Stage: Accepted → Ready for checkin

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 6 years ago

Resolution: → fixed
Status: assigned → closed

In 62f1655:

Fixed #11157 -- Stopped removing stop words in admin's prepopulated_fields.

Co-Authored-By: Andy Chosak <andy@…>

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