Closed Bug 673613 Opened 13 years ago Closed 13 years ago

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

Categories

(Websites :: webifyme.org, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 678267

People

(Reporter: wenzel, Assigned: gjimenez)

Details

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
Assignee: nobody → jbresnik
Fred - doesn't seem to work as expected - can you clarify this a bit more?
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.
After TBG team has reviewed, we'd recommend closing + won't fix this bug. Please confirm.
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
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
Closed: 13 years ago
Resolution: --- → WONTFIX
Resolution: WONTFIX → DUPLICATE
You need to log in before you can comment on or make changes to this bug.