[Zope] newbie question: Redirect from Python?

2000-11-27 Thread Paul Winkler
I want the user to be sent to a particular URL after calling the product's manage_add method. How can I do that? The URL I want is REQUEST['URL3']. I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not it - the RESPONSE doesn't seem to exist here. -- .paul winkler

Re: [Zope] newbie question: Redirect from Python?

2000-11-27 Thread seb bacon
* Paul Winkler [EMAIL PROTECTED] [001127 19:54]: I want the user to be sent to a particular URL after calling the product's manage_add method. How can I do that? The URL I want is REQUEST['URL3']. I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not it - the RESPONSE doesn't seem

Re: [Zope] newbie question: Redirect from Python?

2000-11-27 Thread Paul Winkler
seb bacon wrote: * Paul Winkler [EMAIL PROTECTED] [001127 19:54]: I want the user to be sent to a particular URL after calling the product's manage_add method. How can I do that? The URL I want is REQUEST['URL3']. I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not it - the

Re: [Zope] newbie question: Redirect from Python?

2000-11-27 Thread Michel Pelletier
Paul Winkler wrote: seb bacon wrote: * Paul Winkler [EMAIL PROTECTED] [001127 19:54]: I want the user to be sent to a particular URL after calling the product's manage_add method. How can I do that? The URL I want is REQUEST['URL3']. I've tried

Re: [Zope] newbie question: Redirect from Python?

2000-11-27 Thread Phil Harris
ber 27, 2000 6:26 PM Subject: [Zope] newbie question: Redirect from Python? | I want the user to be sent to a particular URL after calling the | product's manage_add method. How can I do that? | The URL I want is REQUEST['URL3']. | | I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not

Re: [Zope] newbie question: Redirect from Python?

2000-11-27 Thread Paul Winkler
Michel Pelletier wrote: Paul Winkler wrote: (snip) Looking through various Zope docs, I thought RESPONSE.redirect might work, but RESPONSE is not mentioned anywhere in Boring.py. Boring only uses REQUEST. So pass it RESPONSE: def manage_addMyProduct(self, blah, blah, REQUEST=None,

Re: [Zope] newbie question: Redirect from Python?

2000-11-27 Thread Paul Winkler
Dieter Maurer wrote: If you need it in the constructor, then you must either pass in an object that is tied by acquisition or REQUEST or RESPONSE itself, or you must move the call out into the method "manage_afterAdd" (where the object already is tied in). Well, I don't have that method.

Re: [Zope] newbie question: Redirect from Python?

2000-11-27 Thread Paul Winkler
OK, this seems to work. def manage_addMyProduct(self, id, title='', REQUEST=None, RESPONSE=None): self._setObject(id, MyProduct(id, title)) if REQUEST is not None: whereto= REQUEST['URL3'] RESPONSE.redirect(whereto, lock=0) -- .paul winkler