[web2py] Re: Auth form custom errors

2014-08-29 Thread Bernard Nongpoh
Hello Web2py , I'm new to web2py can you please help me in this problem 1. I want to use angularJS +Bootstrap+ Web2py 2. I want to separate the web2py from the view ie. angularJS and Bootstrap 3. All Views Should be handle by angularJS + Bootstrap kind of RESTFUL SERVICES 4. This is the first prob

[web2py] Re: Auth form custom errors

2012-05-07 Thread Massimo Di Pierro
My bad >>> form = auth.login() >>> form['_action']=URL('somewhere') >>> print form >> print form.custom.begin open tag manually. Perhaps web2py can be improved in this respect. On Monday, 7 May 2012 06:32:44 UTC-5, Rhys wrote: > > Hey Massimo, > > The > > {{form=auth()}} > {{form['_acton'] = "

[web2py] Re: Auth form custom errors

2012-05-07 Thread Anthony
When you manipulate the form object after it has been created, form.custom.begin and form.custom.end are the only two things that are not affected. That is because they are both XML() objects and not regular HTML helper objects (they cannot be regular helper objects because they are not full HT

Re: [web2py] Re: Auth form custom errors

2012-05-07 Thread Rhys
Sorry that was a typo in the response not the actual code, as I just tried it again and it still spat out nothing for the action. You have a keen eye David!! :) Cheers, Rhys On Monday, May 7, 2012 9:38:27 PM UTC+10, David J wrote: > > You have a typo "acton" > > Hey Massimo, >> >> The >> >> {{

Re: [web2py] Re: Auth form custom errors

2012-05-07 Thread David J
You have a typo "acton" On May 7, 2012 7:32 AM, "Rhys" wrote: > Hey Massimo, > > The > > {{form=auth()}} > {{form['_acton'] = "/user/login"}} > {{=form.custom.begin}} > > > spat out the html without the updated action > > > > > Cheers, > > Rhys > > > On Monday, May 7, 2012 12:52:20 AM UTC+10, Ma

[web2py] Re: Auth form custom errors

2012-05-07 Thread Rhys
Hey Massimo, The {{form=auth()}} {{form['_acton'] = "/user/login"}} {{=form.custom.begin}} spat out the html without the updated action Cheers, Rhys On Monday, May 7, 2012 12:52:20 AM UTC+10, Massimo Di Pierro wrote: > > Interesting. When you say it did not work. What html did it generat

[web2py] Re: Auth form custom errors

2012-05-06 Thread Massimo Di Pierro
Interesting. When you say it did not work. What html did it generate? On Sunday, 6 May 2012 03:25:41 UTC-5, Rhys wrote: > > Hey Massimo, > > You've steered me in the right direction. > > Basically I've had to put in a pure opening html form element in, and then > use the custom form widgets after

[web2py] Re: Auth form custom errors

2012-05-06 Thread Rhys
Hey Massimo, You've steered me in the right direction. Basically I've had to put in a pure opening html form element in, and then use the custom form widgets afterwards. Works now. Resulting in: {{=form.custom.widget.email}} {{=form.custom.widget.password}} {{=form.custom.end}} The f

[web2py] Re: Auth form custom errors

2012-05-05 Thread Massimo Di Pierro
This is because of the mechanism to prevent CSRF attacks. There are supposed to be two hidden fields, one is the formname. The other is the formkey (a unique onetime token). Try: {{ form=auth.login() form['_action']=URL('user/login') }} {{=form.custom.begin}} {{=form.custom.widget.email}} {{=for

[web2py] Re: Auth form custom errors

2012-05-05 Thread Rhys
Hey Alan, I don't want to redirect. I'll try and to explain it a bit more. Basically I have two forms. One which is a drop down, in pure html ^ this Form is on every page which the user is not logged into. When they fill out this form and click submit I want the /us

[web2py] Re: Auth form custom errors

2012-05-05 Thread Alan Etkin
*auth.is_logged_in()* will return a bool object. True for authenticated user and I belive *auth.user_id* attribute is None for the non authenticated user. *auth *being the Auth class instance created by the welcome scaffolding application. You could use the returned values to catch unsuccessful