[Zope3-Users] nextURL: add vs edit

Shaun Cutts shaun at cuttshome.net
Fri Feb 17 13:42:34 EST 2006


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

-----Original Message-----
From: zope3-users-bounces+shaun=cuttshome.net at zope.org
[mailto:zope3-users-bounces+shaun=cuttshome.net at zope.org] On Behalf Of
Shaun Cutts
Sent: Friday, February 17, 2006 1:17 PM
To: Zope3-users at zope.org
Subject: [Zope3-Users] nextURL: add vs edit

Is there a reason why zope.app.form.browser.add.AddView defines:

    def nextURL(self):
        return self.context.nextURL()

but zope.app.form.browser.editview.EditView doesn't?

My redirection works for add but not edit, and this is the reason. Is
this a feature or a bug? If a bug, all that needs to happen is that
nextURL get moved to EditView from AddView, as EditView is base for Add.


But perhaps there is a reason for this I don't understand?

- Shaun




More information about the Zope3-users mailing list