<div dir="ltr">Thank you very much! It really helps me.<div><br></div><div style>Regards,</div><div style>Toshiyuki</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 28, 2013 at 12:33 PM, Gabriel Hurley <span dir="ltr"><<a href="mailto:Gabriel.Hurley@nebula.com" target="_blank">Gabriel.Hurley@nebula.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you look at the code in the post()[1] method of the base workflow view you'll note that a response to a successful workflow POST is always a redirect[2] (caveat for when it's specifically adding data back to a field, which isn't relevant here).<br>
<br>
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.<br>
<br>
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.<br>
<br>
Hope that helps,<br>
<br>
- Gabriel<br>
<br>
[1] <a href="https://github.com/openstack/horizon/blob/master/horizon/workflows/views.py#L130" target="_blank">https://github.com/openstack/horizon/blob/master/horizon/workflows/views.py#L130</a><br>
[2] <a href="https://github.com/openstack/horizon/blob/master/horizon/workflows/views.py#L156" target="_blank">https://github.com/openstack/horizon/blob/master/horizon/workflows/views.py#L156</a><br>
<div><div class="h5"><br>
<br>
> -----Original Message-----<br>
> From: Toshiyuki Hayashi [mailto:<a href="mailto:hayashi@ntti3.com">hayashi@ntti3.com</a>]<br>
> Sent: Tuesday, August 27, 2013 2:26 PM<br>
> To: <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> Subject: [openstack-dev] [Horizon] Modal form without redirect<br>
><br>
> Hi all,<br>
><br>
> I'm working on custmoizing modal form for topology view, I would like to<br>
> prevent redirecting after submitting.<br>
> <a href="https://github.com/openstack/horizon/blob/master/horizon/static/horizon/" target="_blank">https://github.com/openstack/horizon/blob/master/horizon/static/horizon/</a><br>
> js/horizon.modals.js#L110<br>
> According to this code, if there is a no redirect_header, the modal form won't<br>
> redirect. But I couldn't figure out how to remove redirect information from<br>
> http header.<br>
> For example, if I want to remove redirect from LaunchInstance<br>
> <a href="https://github.com/openstack/horizon/blob/master/openstack_dashboard/" target="_blank">https://github.com/openstack/horizon/blob/master/openstack_dashboard/</a><br>
> dashboards/project/instances/workflows/create_instance.py#L508<br>
> How should I do that?<br>
> I tried "success_url = None", but it doesn't work.<br>
><br>
> If you have any idea, that would be great.<br>
><br>
> Regards,<br>
> Toshiyuki<br>
><br>
</div></div>> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Toshiyuki Hayashi<br>NTT Innovation Institute Inc.<br>Tel:650-579-0800 ex4292<br><a href="mailto:mail%3Ahayashi@ntti3.com" target="_blank">mail:hayashi@ntti3.com</a>
</div>