Personal tools
You are here: Home Lists ZPUG DC List Archives 2005 2005-03 python prob / prabuddha ray <buddharay@gmail.com>
Navigation
Log in


Forgot your password?
New user?
Mailing Lists
You can read our ZPUGDC mailing list archives online.
You can subscribe to our mailing list:
Book Review

The Definitive Guide to Plone

Reviewer: joel
 

python prob / prabuddha ray <buddharay@gmail.com>

python prob
prabuddha ray <buddharay(at)gmail.com>
2005-03-31 03:14:42 [ FULL ]
jules sir this is buddha here,
i'm kinda new to python ;
wanted to build an intermediate script python for redirection from a ZPT .
code tried is 

req = container.REQUEST
RESP =  request.RESPONSE

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


plz help
[...]

Re: [ZPUGDC] python prob / Jules <jules@jules.com>

Re: [ZPUGDC] python prob
Jules <jules(at)jules.com>
2005-03-31 07:08:30 [ FULL ]
On Mar 31, 2005, at 4:28 AM, prabuddha ray wrote:
[...]

Good  morning. There are plenty of others of us on this list. So no 
need to just ask me for help -- anybody can usually jump in. In fact 
you're very welcome to come to a meeting and meet some of us!

You're trying to protect something based on a username and password? If 
that's the case, you're making a lot of work for yourself. Zope has so 
much built-in stuff to handle this.

I think what you probably want is something along these lines:

	http://www.zope.org/Members/vladap/mysqlUserFolder

Can you tell us a bit more about what you're building? And what it's 
supposed to do?

Go into the ZMI and have a look at the Security tab. This, plus the 
authentication above, might be the key to solving your problem quickly. 
Read up on Zope's security and you'll have a better idea of how it 
controls access to objects.

Good luck!
[...]

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: