On Tuesday January 27, 2009 16:08:45 Gustavo Narea wrote:
> class MyAuthenticator(SQLAlchemyAuthenticatorPlugin):
> def authenticate(self, environ, identity):
> userid = super(MyAuthenticator, self).authenticate(environ,
> identity)
> if userid:
> flash('Welcome back!')
> else:
> flash('Wrong credentials', 'warning')
Oops, there was a bug... it should be:
> class MyAuthenticator(SQLAlchemyAuthenticatorPlugin):
> def authenticate(self, environ, identity):
> userid = super(MyAuthenticator, self).authenticate(environ,
> identity)
> if userid:
> flash('Welcome back!')
> else:
> flash('Wrong credentials', 'warning')
> return userid
Cheers.
--
Gustavo Narea <http://gustavonarea.net/>.
Get rid of unethical constraints! Get freedomware:
http://www.getgnulinux.org/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---