[Zope] python prob

Pascal Peregrina Pperegrina at Lastminute.com
Tue Mar 29 07:16:42 EST 2005


Also, I think that :

"else"

should be :

"else:"

Pascal

-----Message d'origine-----
De : zope-bounces at zope.org [mailto:zope-bounces at zope.org]De la part de
Vangelis Mihalopoulos
Envoyé : mardi 29 mars 2005 14:03
À : prabuddha ray
Cc : zpugdc at zope.org; zope at zope.org
Objet : Re: [Zope] python prob


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
>  
>
_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



More information about the Zope mailing list