[Zope] python(script) passing parameters with RESPONSE.redirect

Tino Wildenhain tino@wildenhain.de
Fri, 25 Jul 2003 15:38:47 +0200


Hi AdvertisingDept, (silly realname that is ;))

AdvertisingDept wrote:
> if I call from a python script...
> 
> context.REQUEST.RESPONSE.redirect(context.WhereTo.absolute_url())
> 
> is it possible to pass some parameters along with the redirect?
> 
> Can these parameters be set 
> so they may become part of the REQUEST for the WhereTo object?

You can always append URL variables, to make it easy, there is a
function:

from ZTUtils import make_query

querystr=make_query({'foo':1, 'bar':'hello'})

context.REQUEST.RESPONSE.redirect(context.WhereTo.absolute_url()+'?'+querystr)


HTH
Tino Wildenhain