[Zope] namespace problems

Gary Lowder gary@lowder.com
Mon, 29 Jan 2001 09:56:02 -0600


I really appreciate your help, but I continue to have problems with this
line, and this is turning into a quest of sorts  ;)  .

When I use "context.REQUEST.RESPONSE.redirect(URL1)" in my python script
I get "NameError URL1".
When I bind _ as you suggested, and use "_.RESPONSE.redirect(URL1)" I
get "AttributeError RESPONSE".

I'm confused, but very grateful for your help so far.

Gary.



Chris Withers wrote:
> 
> > Chris Withers wrote:
> > >
> > > > How would I do the URL redirect using an equivalent to the
> > > > <dtml-call "RESPONSE.redirect(URL1)">   that's in the DTML Method below?
> > >
> > > context.RESPONSE.redirect(URL1)
> 
> D'Oh...
> 
> Either replace it with:
> 
> context.REQUEST.RESPONSE.redirect(URL1)
> 
> ...or do the following:
> 
> -Go to the bindings tab and bind _ to the Namespace.
> -Then do _.RESPONSE.redirect(URL1)
> 
> cheers,
> 
> Chris