[Zope] python prob

Vangelis Mihalopoulos mihalop at VTrip.NET
Tue Mar 29 07:03:24 EST 2005


Indentation maybe?
the if-else part should be on the outer indent like......

req = container.REQUEST
RESP =  request.RESPONSE

user=req.username
pwd=req.password
# chkpwd is a ZSQL method taking username as arg and giving its
correspong passwd
if  container.chkpwd(user)==pwd :            #    it givs syntax error here
	RESP.redirect(test)
else
	RESP.redirect(index_html)



prabuddha ray wrote:

>i'm kinda new to python ;
>wanted to build an intermediate scrip python for redirection from a ZPT .
>code tried is 
>
>req = container.REQUEST
>RESP =  request.RESPONSE
>
>user=req.username
>pwd=req.password
># chkpwd is a ZSQL method taking username as arg and giving its
>correspong passwd
>	if  container.chkpwd(user)==pwd :            #    it givs syntax error here
>		RESP.redirect(test)
>	else
>		RESP.redirect(index_html)
>
>plz help
>  
>


More information about the Zope mailing list