[openstack-dev] [Horizon] Modal form without redirect
Gabriel.Hurley at nebula.com
Wed Aug 28 19:33:58 UTC 2013
If you look at the code in the post() method of the base workflow view you'll note that a response to a successful workflow POST is always a redirect (caveat for when it's specifically adding data back to a field, which isn't relevant here).
The reason for this is that in general when you POST via a standard browser request you want to send back a redirect so that reloading the page, etc. behave correctly and don't potentially result in double-POSTs.
If you're submitting the workflow via a regular HTTP from submit POST then I'd say redirecting is correct; you simply want to redirect to the current page. If you're doing this via AJAX then you'll want to add some new code to otherwise signal a successful response (both to the code and to the user) and to take action accordingly.
Hope that helps,
> -----Original Message-----
> From: Toshiyuki Hayashi [mailto:hayashi at ntti3.com]
> Sent: Tuesday, August 27, 2013 2:26 PM
> To: OpenStack-dev at lists.openstack.org
> Subject: [openstack-dev] [Horizon] Modal form without redirect
> Hi all,
> I'm working on custmoizing modal form for topology view, I would like to
> prevent redirecting after submitting.
> According to this code, if there is a no redirect_header, the modal form won't
> redirect. But I couldn't figure out how to remove redirect information from
> http header.
> For example, if I want to remove redirect from LaunchInstance
> How should I do that?
> I tried "success_url = None", but it doesn't work.
> If you have any idea, that would be great.
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
More information about the OpenStack-dev