[Zope3-Users] nextURL: add vs edit

Gary Poster gary at zope.com
Fri Feb 17 13:53:34 EST 2006


On Feb 17, 2006, at 1:42 PM, Shaun Cutts wrote:

> Ok,
>
> In AddView.update,
>
>         self.request.response.redirect(self.nextURL())
>
> is called, but this is not called in EditView... so change isn't as
> simple as moving nextURL. However, if you put this line into
> EditView.update as well as moving nextURL, then my redirect works  
> fine.
>
> But does this break anything else? Is there some reason why the  
> editview
> doesn't do redirect?
>
> I have gotten offlist feedback that I'm not the only one interested in
> this....
>
> Thanks,
> - Shaun

This behavior is by design.

add forms need the nextURL because it is advisory to the IAdding.

edit forms can just use the changed hook to call  
self.request.response.redirect('http://whereever.you.want/to/go')

Or use formlib, and be able to be fully in charge the way you'll  
eventually want to be.

Gary


More information about the Zope3-users mailing list