When you say it does not work what do you mean? No display, no validation? Which os? which web2py version?
On Dec 17, 9:45 pm, ed <[email protected]> wrote: > Hi Hamdy, > Yes, i upgraded to svn 1.72.3 and the code below does not work. I > don't know what is happening here. I used login_catpcha and also > changed it to login_captcha but still it doesn't work. I missed > something here because i already updated to the latest version by > clicking "click to check for upgrades" but still the problem persists. > I am out of solution. > ------------------------------------------------------------------------- > On Dec 10, 6:00 pm, "hamdy.a.farag" <[email protected]> wrote:> Hi ed > > > I assume you upgraded your web2py to the latest svn version > > Now you can do : > > > def login(): > > auth.settings.login_catpcha =Recaptcha > > (request,public_key,private_key) > > form =auth.login() > > > see the auth.settings.login_captcha -notauth.settings.captcha- ? > > may be here's your problem > > > I tested that and it works fine for me > > ------------------------------------------------------------ > The code below works in displaying Recaptcha but fails to validate the > two words if you input invalid words. Massimo is right, this won't > work properly. Another thing is that I cannot find "gluon/tools.py" > only "gluon/tools.pyc". > > > > >what I can't understand actually is that : > >using latest svn version and removing lines : > >''' > > if self.settings.login_captcha != None: > > form[0].insert(-1, TR('', self.settings.login_captcha, > >''))''' > >"" > > from tools.py > >I managed to have ed's code running : > >so something like this : > >if request.args(0) == 'login': > > from gluon.tools import Recaptcha > > form = auth.login() > > form[0].insert(-1, TR('', Recaptcha(request, 'pub', > >'private')) > > form[0][-1][1].append(INPUT > >(_type='button',_value='Cancel',_onclick="window.location='%s';"%URL > >(r=request,f='index'))) > > return dict(form=form) > >is working , regardless of the fact that I inserted Recaptcha field > >afteter form = auth.login() > >did I get it wrong ? > > -------------------------------------------------------------------------- > Thanks for your help. > Ed -- You received this message because you are subscribed to the Google Groups "web2py-users" 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/web2py?hl=en.

