Opened 12 years ago
Closed 12 years ago
#18660 closed Bug (fixed)
View on Site links get localized and break urls
Reported by: | Eduardo Cereto | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.4 |
Severity: | Normal | Keywords: | localization |
Cc: | eduardocereto@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
When object ids are larger than 1000 and you have localization turned on the "View on Site" links on the admin break because the ids get a thousand separator and that render invalid shortcut urls.
This is a very old bug and I'm sure I reported it before. Just can't seem to find it anymore. But I just confirmed it still happens on 1.4.
I know the fix should be simple. It's just a matter of using the template filter unlocalize or maybe {% localize off %} around the problematic code. But I fid this solution somehow not very elegant.
Possibly affected files:
admin/templates/admin/change_form.html
admin/templates/admin/edit_inline/stacked.html
admin/templates/admin/edit_inline/tabular.html
Change History (7)
comment:1 by , 12 years ago
Cc: | added |
---|
comment:2 by , 12 years ago
Has patch: | set |
---|
comment:3 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Triage Stage: | Unreviewed → Fixed on a branch |
Seems like the master branch already addresses this in a different manner. I'm not sure how it works, but it does. So this change is unnecessary anymore. Sorry I should have tested the master branch before opening this ticket.
comment:5 by , 12 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Re-opening to consider the addition of this test case.
comment:6 by , 12 years ago
Triage Stage: | Fixed on a branch → Ready for checkin |
---|
The test looks good; fails on commit 108f8dd, passes afterwards.
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Pull Request with possible Fix
https://github.com/django/django/pull/226