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
* 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
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
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
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
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,
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.
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