Re: [Help] Login tag displays the login page but I can't login.
"Jonathan Ellis" <[email protected]> Tue, 29 Aug 2006 14:25:47 -0700
| Newsgroups | gmane.comp.python.spyce.general |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 29 Aug 2006 17:15:14 -0400, "Simeon Wu Kwai" <[email protected]> said: > Login tag displays the login page but I can't login, nothing seems to > happen. I have the login_tokens directory and a simple postgres table > with id, username and password. > > The test page code. > > <spy:login_required /> > > My Vaildator which is in config.py. > > def validator(login, password): > user = db.users.selectone_by(user_name=login, password=password) > if user: > return user.id > return None > > Additional customization of config.py. > > login_validator = validator > login_storage = FileStorage(r'/home/data/civ_monitor/trunk/login-tokens') > login_render = 'render:login' > loginrequired_render = 'render:login_required' Hmm, sounds like it's just a bad login. Did you try adding debug statements to validator to see if it is really running? -J -- C++ is history repeated as tragedy. Java is history repeated as farce. --Scott McKay ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642