Redirect after submission should use reverse(), not hard-coded URL.

RESOLVED DUPLICATE of bug 678267

Status

--
minor
RESOLVED DUPLICATE of bug 678267
7 years ago
7 years ago

People

(Reporter: wenzel, Assigned: gjimenez)

Tracking

Details

(Reporter)

Description

7 years ago
That's the double redirect Krupa saw after every submission:

<https://github.com/mozilla/webifyme/blob/5efa125/ff4/things/views.py#L329>

If you use commons.urlresolvers.reverse()[1], the locale will be part of the redirect and won't cause a second redirect.

[1] works basically like django's reverse(): https://docs.djangoproject.com/en/dev/topics/http/urls/#reverse

Updated

7 years ago
Assignee: nobody → jbresnik

Comment 1

7 years ago
Fred - doesn't seem to work as expected - can you clarify this a bit more?
(Reporter)

Comment 2

7 years ago
If you use reverse('collage', args=[collage.slug]) to determine the URL, then the URL will contain the locale ("/de/collage..."), so the localeurlmiddleware won't need to detect the locale, then redirect again.

Comment 3

7 years ago
After TBG team has reviewed, we'd recommend closing + won't fix this bug. Please confirm.
(Reporter)

Comment 4

7 years ago
I'll leave the product decision up to cmore and Grace.

The bug has a performance impact and will result in users with, say, an en-US browser, but looking at a different locale intentionally, to suddenly switch locales back to en-US after their submission. It would be annoying but rather rare.
Assignee: jbresnik → gjimenez

Comment 5

7 years ago
There will be a slight performance issue with this edge case and going to not resolve this due to the need to finish up blockers and launch.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
(Reporter)

Updated

7 years ago
Duplicate of this bug: 678878
(Reporter)

Updated

7 years ago
Resolution: WONTFIX → DUPLICATE
Duplicate of bug: 678267
You need to log in before you can comment on or make changes to this bug.