[Zope] RESPONSE.redirect not working

Andrew Hedges andrew at clearwired.com
Tue May 23 18:57:11 EDT 2006


Jo,

THANK YOU!  This worked (with a slight change to the dtml-return):

<dtml-unless pyCheckSession>
	<dtml-return login_html>
</dtml-unless>

I *thought* I had seen redirect work as I had had it before, but  
maybe I misunderstood what was happening.  In any case, many thanks!

-Andrew

On May 23, 2006, at  5/23/2006 4:46 PMMDT, Jo Meder wrote:

> Hi there!
>
> Given your code in pyCheckSession try the following (not tested):
>
> <dtml-unless pyCheckSession>
>   <dtml-return "">
> </dtml-unless>
>
> and change pyCheckSession to:
>
>> if url <> '':
>> 	"If we have need to, bump the user out"
>> 	RESPONSE.redirect(url)
>     return 0
> ....
>   else:
>     ....
>     return 1
>
> The call to "redirect" doesn't magically stop processing of everything
> else you programmed.



More information about the Zope mailing list