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)

18700.diff (2.0 KB ) - added by Simon Meers 12 years ago.
18700b.diff (2.0 KB ) - added by Simon Meers 12 years ago.
Forgot quotes
18700c.diff (2.0 KB ) - added by Simon Meers 12 years ago.
nicer URL name

Download all attachments as: .zip

Change History (11)

comment:1 by Simon Meers, 12 years ago

Triage Stage: UnreviewedAccepted

Already accepted in #18472

by Simon Meers, 12 years ago

Attachment: 18700.diff added

comment:2 by Simon Meers, 12 years ago

Has patch: set

by Simon Meers, 12 years ago

Attachment: 18700b.diff added

Forgot quotes

comment:3 by Claude Paroz, 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

comment:4 by Simon Meers, 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?

in reply to:  4 comment:5 by Claude Paroz, 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!

by Simon Meers, 12 years ago

Attachment: 18700c.diff added

nicer URL name

comment:6 by Simon Meers, 12 years ago

I'll leave this open for a couple more days before committing it.

comment:7 by Claude Paroz, 12 years ago

Triage Stage: AcceptedReady for checkin

comment:8 by Simon Meers <simon@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [10f979fd92000de1ac9713351f5cb749e2cbca03]:

Fixed #18700 -- Added URL reversal for i18n set_language view.

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