good catch it's working now On Friday, February 14, 2014 11:06:39 PM UTC-5, Massimo Di Pierro wrote: > > auth.settings.login_catpcha = Recaptcha(request, public_key, private_key) > > should be > > auth.settings.login_captcha = Recaptcha(request, public_key, private_key) > > On Friday, 14 February 2014 11:31:57 UTC-6, User wrote: >> >> I want to add a captcha to my login form. Eventually I want this to be >> conditional based on how many login attemps have been made. However, my >> first step is to get it to show on the login form. In my default.py >> controller I have: >> >> def user(): >> function = request.args(0) >> if function == 'register': >> # ... >> elif function == 'login': >> #import ipdb; ipdb.set_trace() >> auth.settings.login_onfail = login_failed >> from gluon.tools import Recaptcha >> public_key = 'xyz' >> private_key = 'xyz' >> auth.settings.login_catpcha = Recaptcha(request, >> public_key,private_key >> ) >> form = auth.login() >> >> return dict(form=form) >> >> >> >> >> When I visit the page I get: >> >> >> <type 'exceptions.SyntaxError'> setting key 'login_catpcha' does not exist >> >> Commenting out offending line and the code works (albeit without a >> captcha) Any ideas on what's going wrong here? >> >
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

