Opened 11 years ago

Closed 7 weeks ago

#11157 closed Cleanup/optimization (fixed)

Allow stopwords in admin javascript URLify.

Reported by: keeperofkeys Owned by: Scott Cranfill
Component: contrib.admin Version: master
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 Changed 11 years ago by Chris Beaven

Resolution: wontfix
Status: newclosed

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 Changed 2 months ago by Adam (Chainz) Johnson

Easy pickings: unset
Resolution: wontfix
Severity: Normal
Status: closednew
Triage Stage: UnreviewedAccepted
Type: Cleanup/optimization
UI/UX: unset
Version: 1.1-betamaster

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 Changed 2 months ago by Adam (Chainz) Johnson

Owner: changed from nobody to Andy Chosak
Status: newassigned

comment:4 Changed 2 months ago by felixxm

Summary: slugify and admin javascript URLify function produce different stringsAllow stopwords in admin javascript URLify.

comment:5 Changed 8 weeks ago by Scott Cranfill

Cc: Scott Cranfill added
Has patch: set
Owner: Andy Chosak deleted
Status: assignednew

comment:6 Changed 8 weeks ago by felixxm

Owner: set to Scott Cranfill
Status: newassigned

comment:7 Changed 8 weeks ago by felixxm

Patch needs improvement: set

comment:8 Changed 7 weeks ago by felixxm

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:9 Changed 7 weeks ago by Mariusz Felisiak <felisiak.mariusz@…>

Resolution: fixed
Status: assignedclosed

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