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...
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 met
Paul Winkler writes:
> 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.
I h
Phil Harris wrote:
>
> You need to be careful when redirecting from an external Python wotsit.
>
> RESPONSE.redirect raises an exception which can make the transaction get
> rolled back.
>
> This seems not to happen when called from dtml but I've seen it happen from
> an external Python wotsit.
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, RE
Sent: Monday, November 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.red
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 RESPONSE
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
* 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
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
10 matches
Mail list logo