Template +edit and +admin forms should use referrer in next_url
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Adi Roiban |
Bug Description
In the merge review for bug 340664, Curtis noted that the next_url for potemplate edit and admin forms is not using the referer address.
Below are his comments:
The behaviour of these actions is disconcerting. When I edit a a template,
the next_url is the template, but I expected to return to the all templates
view. I know that this behaviour has not changed in this branch. I do not
see any bugs that pertain to this surprise--maybe I do not know what to
search on. Here is an example of how to negotiate multiple origins:
@property
def next_url(self):
referrer = self.request.
if (referrer is not None
and referrer.
return referrer
else:
return canonical_
Related branches
- Graham Binns (community): Approve (code)
-
Diff: 140 lines (+87/-6)4 files modifiedlib/lp/app/templates/generic-edit-next-url.pt (+19/-0)
lib/lp/translations/browser/configure.zcml (+2/-2)
lib/lp/translations/browser/potemplate.py (+33/-2)
lib/lp/translations/stories/standalone/xx-potemplate-edit.txt (+33/-2)
- Graham Binns (community): Approve (code)
-
Diff: 194 lines (+47/-61)5 files modifiedlib/canonical/launchpad/templates/launchpad-form.pt (+10/-1)
lib/canonical/launchpad/webapp/launchpadform.py (+30/-1)
lib/lp/app/templates/generic-edit-next-url.pt (+0/-19)
lib/lp/translations/browser/configure.zcml (+2/-2)
lib/lp/translations/browser/potemplate.py (+5/-38)
Changed in rosetta: | |
assignee: | nobody → Adi Roiban (adiroiban) |
Changed in rosetta: | |
status: | New → In Progress |
Changed in rosetta: | |
importance: | Undecided → Low |
Changed in rosetta: | |
status: | In Progress → Fix Committed |
tags: | added: qa-needstesting |
tags: |
added: qa-bad removed: qa-needstesting |
tags: |
added: qa-ok removed: qa-needstesting |
Fixed in stable r10497 <http:// bazaar. launchpad. net/~launchpad- pqm/launchpad/ stable/ revision/ 10497>