Opened 12 years ago
Closed 12 years ago
#18700 closed Cleanup/optimization (fixed)
`set_language` view documentation uses hard-coded URL
Reported by: | Simon Meers | Owned by: | Simon Meers |
---|---|---|---|
Component: | Documentation | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | 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
As reported in #18472, the form action
should use URL reversal.
Attachments (3)
Change History (11)
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 12 years ago
Attachment: | 18700.diff added |
---|
comment:2 by , 12 years ago
Has patch: | set |
---|
comment:3 by , 12 years ago
What about using 'set_language' as view name?
I think that we should also use the url template tag in the form action url in https://docs.djangoproject.com/en/dev/topics/i18n/translation/#django.conf.urls.i18n.set_language
follow-up: 5 comment:4 by , 12 years ago
What about using 'set_language' as view name?
Yes, I agree. setlang
irked me, but I thought I should match it. I'd like to change the URLconf to use /set-language/
too, but backwards-compatibility might pose problems (which is exactly why we *don't* use hardcoded URLs, especially in official documentation!)
I think that we should also use the url template tag in the form action url
That link seems to be the one that I've already patched?
comment:5 by , 12 years ago
Replying to DrMeers:
What about using 'set_language' as view name?
Yes, I agree.
setlang
irked me, but I thought I should match it. I'd like to change the URLconf to use/set-language/
too, but backwards-compatibility might pose problems (which is exactly why we *don't* use hardcoded URLs, especially in official documentation!)
I'm not particularly shocked by the setlang (URL)/set_language (View name) difference.
I think that we should also use the url template tag in the form action url
That link seems to be the one that I've already patched?
/o\ sorry!
comment:7 by , 12 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:8 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Already accepted in #18472