[web2py] Re: login form

2017-03-30 Thread Dave S
To expand on Anthony's reference, I'd start at the beginning of the book with http://web2py.com/books/default/chapter/29/03/overview#Adding-authentication> for a very simple example. On Thursday, March 30, 2017 at 12:55:56 PM UTC-7, Happy Rob wrote: > > This is a quick one here, It's (extremely)

[web2py] Re: login form

2017-03-30 Thread Happy Rob
This is a quick one here, It's (extremely) ugly and basic, but should give you a framework to figure out from. I did it on pythonanywhere for free which is pretty cool. The template below should work on local or others though. No email out or $ because the pythonanywhere free version doesn't all

[web2py] Re: login form

2017-03-30 Thread Anthony
On Thursday, March 30, 2017 at 8:32:00 AM UTC-4, karimhayda...@gmail.com wrote: > > hello > i am new in web2py and also in MVC framework. > i want to build a simple login form (username+password) > > How to build a form + data base?? > You should start by reading the documentation

[web2py] Re: Login form adittional fields

2014-03-22 Thread xgp . latino
Hi Leonel, I need to authenticate 3 fields instead if usual 2. Because i need to used identification number and type of identification document and the usual password to login. Gonna try login_bare. Thanks. El viernes, 21 de marzo de 2014 22:51:21 UTC-5, Leonel Câmara escribió: > > I don't g

[web2py] Re: Login form adittional fields

2014-03-21 Thread Leonel Câmara
I don't get it why do you need 3 fields? Anyway you could just add the field to your custom form. Then instead of using auth.login(), get the user for the id/email/whatever you're using and then login with login_bare. -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

[web2py] Re: Login form on index page

2013-12-27 Thread Massimo Di Pierro
You can insert def index(): form = auth.login() if auth.user: message="welcome %s" % auth.user.first_name else: message = 'login please' return dict(form=form, message=message) and in view: ... {{=form}} {{=message}} ... On Thursday, 26 December 2013 13:39:07 UTC-6, Unnikrishnan P

[web2py] Re: Login form - How can I disable or easily avoid url hex encoding in login_next?

2013-06-21 Thread Massimo Di Pierro
Please open a ticket about this and we will look into it asap. On Wednesday, 19 June 2013 14:48:35 UTC-5, Georgess wrote: > > Hi all, > For example original url is /init/service/index?service_code=sf_vod > but for login form it became as _next = > /init/service/index%3Fservice_code%3Dsf_vod > >

Re: [web2py] Re: Login form password widget chaned

2012-11-30 Thread Anthony
Looks like this was done so the entropy-checking Javascript script element could be appended to the CAT (i.e., right after the INPUT element). Note, the original INPUT element is still there (inside the CAT element), so you should still be able to add a placeholder with a slight adjustment to yo

Re: [web2py] Re: Login form password widget chaned

2012-11-30 Thread Niphlod
you need to apply that to the INPUT and not the tag CAT. The Password widget if there is an IS_STRONG validator now "translates" to CAT with the INPUT followed by a SCRIPT. Don't know how did you placed your placeholders, but I bet this form.elements('#auth_user_email')[0]['_placeholder']='placeh

Re: [web2py] Re: Login form password widget chaned

2012-11-30 Thread Felipe Meirelles
Well, and is there possible to set his placeholder this way? On Fri, Nov 30, 2012 at 2:31 PM, Niphlod wrote: > yep, now it carries the script to enable the entropy color codes. > > Il giorno venerdì 30 novembre 2012 17:21:15 UTC+1, Felipe Meirelles ha > scritto: >> >> def index(): >> form =

Re: [web2py] Re: Login form password widget chaned

2012-11-30 Thread Niphlod
yep, now it carries the script to enable the entropy color codes. Il giorno venerdì 30 novembre 2012 17:21:15 UTC+1, Felipe Meirelles ha scritto: > > def index(): > form = auth() > logging.info(form.custom) > > , > 'widget': , > 'id': '', 'email': }>, 'end': > , 'linkto': , 'begin': >

Re: [web2py] Re: Login form password widget chaned

2012-11-30 Thread Felipe Meirelles
def index(): form = auth() logging.info(form.custom) , 'widget': , 'id': '', 'email': }>, 'end': , 'linkto': , 'begin': , 'submit': , 'label': , 'deletable': '', 'inpval': , 'dspval': , 'id': , 'email': }>}> That password widget used to be a gluon.html.INPUT same as email but now it is a

[web2py] Re: Login form password widget chaned

2012-11-30 Thread Massimo Di Pierro
What change are you referring to? Can you provide more details? On Friday, November 30, 2012 9:01:18 AM UTC-6, Felipe Meirelles wrote: > > Did you changed the password widget on the login form from INPUT to CAT? > Is there a reason to this change? > > I had a placeholder on it and since DIVs dont

[web2py] Re: login form error when change db to mongodb

2012-06-12 Thread stu
did you get anywhere on this? I get a similar error On Wednesday, May 9, 2012 1:35:38 AM UTC-5, Scorpion wrote: > > > Hey Guys. > > I is newbie developer web with web2py. I change db DAL to > > db = DAL > ('mongodb://localhost:27017/apps') > > an

[web2py] Re: Login form, can't login..

2012-04-02 Thread Joseph.Piron
Ok, it seems it is Chrome related.. :| I tried with Firefox and Safari and they hit the server only once. Could someone please confirm he has the same problem with Chrome (build 18.0.8025.142) ?? Le lundi 2 avril 2012 15:31:23 UTC+2, Joseph.Piron a écrit : > > Hi all, > > I got another probl

[web2py] Re: Login form hidden "_next" field isn't reset

2011-11-21 Thread Vinicius Assef
Does anyone know anything about this problem? On Fri, Nov 18, 2011 at 12:33 AM, Vinicius Assef wrote: > I'm making some tests with Auth and I'm facing one problem. > > This is my controller: http://pastebin.com/CNigd5qL > I have a normal login form in default/index > > I'm following this flow: >

[web2py] Re: login form errors

2011-11-09 Thread Cliff
Perhaps someone who knows more about the core will chime in. Failing that, maybe this will put you on the scent ... In db.py there should be a line something like auth=Auth(db), which comes after 'from gluon.tools import ... auth .. So the Auth class is in gluon/tools.py. Auth contains the logi

Re: [web2py] Re: login form errors

2011-11-08 Thread Matt Broadstone
When I looked at how the generated sample app handled showing that there was an error with logging in, it showed the message in a flash area in the view. To be clear here: the controller is a two-liner: def user(): return dict(form=auth()) so there is no setup in the controller, as it relates

[web2py] Re: login form errors

2011-11-08 Thread Cliff
Is there a div with the id of 'flash' in your view? On Nov 8, 11:14 am, Matt wrote: > Greetings, > We are currently experiencing an issue with invalid logins not showing > errors. For auth we are using a combination of basic auth and PAM, and > the actual controller/view combo for the login form

[web2py] Re: login form errors

2011-11-08 Thread Yannick
Not sure if I understand your issue. Have you set up the session.flash in your controller and the value of it is not showing off ? Are you doing a redirect when the login failed ? Maybe if you show us a sample of your code we may have a better understanding of your issue. Cheers, On Nov 8, 11:1

[web2py] Re: Login form error "KeyError: 'email'" after customizing db.auth_user table

2011-05-22 Thread Anthony
On Sunday, May 22, 2011 4:01:51 PM UTC-4, haggis wrote: > > > Next step is to figure out how to disable the reset password actions. See http://web2py.com/book/default/chapter/08#Restrictions-on-registration. I think it would be: auth.settings.actions_disabled.extend([ 'reset_password','reque

[web2py] Re: Login form error "KeyError: 'email'" after customizing db.auth_user table

2011-05-22 Thread haggis
Thanks both of you! This helped me understanding a little bit more of what happens inside. As Anthony suggested I just renamed the 'name' field to 'username' and everything is fine now. Next step is to figure out how to disable the reset password actions.

[web2py] Re: Login form error "KeyError: 'email'" after customizing db.auth_user table

2011-05-20 Thread Anthony
On Friday, May 20, 2011 7:00:08 PM UTC-4, haggis wrote: > > Hi, > since I doesn't need any email adresses associated with my users, I > changed the schema of the auth_user table like this: > > file: db.py > > > db.define_table( > auth.settings.table_user_name, > Field('name', lengt

[web2py] Re: Login form error "KeyError: 'email'" after customizing db.auth_user table

2011-05-20 Thread Massimo Di Pierro
Auth requires the email field. without it there is no way to reset password. Anyway you can do db.auth_user.email.readable=False db.auth_user.email.writable=False and disable the reset password actions. On May 20, 6:00 pm, haggis wrote: > Hi, > since I doesn't need any email adresses associate

[web2py] Re: Login form (remember for 30 days not working)

2011-01-30 Thread Arun K.Rajeevan
I see in gae admin interface, we can set cookie expiry time. We have 3 options, 1day, 1week, 2week. In that case, even though the label reads keeps logged in for 30days it'll be in effect for 15 days. How, should I change the label to keep logged in for 15days.

[web2py] Re: Login form (remember for 30 days not working)

2011-01-26 Thread Massimo Di Pierro
Usually the problem is the admin/cron job that cleans up the sessions. On Jan 26, 2:04 pm, "Arun K.Rajeevan" wrote: > My client says even if he set remember me for 30 days he automatically > get logged-out after a few hours. > > Is there any special settings to enable this feature? > > client say

[web2py] Re: login form with a popup

2010-12-13 Thread ma...@rockiger.com
Could you show you browser-source? But actually I have to admit, Branko is right. You don't get the redirect. I used it in a situation where I didn't want a redirect. @Branko Coud you give an example of a partial form? Marco

[web2py] Re: Login form for mobile web access

2010-08-20 Thread Adi
I've realized re-using code becomes quite a hastle - for example if you use 2 or 3 column layout for web, 1 column layout works best for mobile. I've created new controller and views to be shown on the mobile (even if they are duplicated), and use redirect() and auth.settings.myfunction_next where

[web2py] Re: Login form for mobile web access

2010-08-20 Thread mdipierro
You cannot have extend in a conditional but you can have {{extend layout}} and in controller or model: if phone.screensize < 100: lauout='layout100.htm;' elif phone.screensize < 200: layout='layout200.html' else: layout='layout.html' On Aug 20, 5:38 am, Jason Brower wrote: > I buil

[web2py] Re: Login form

2010-02-07 Thread weheh
On item 2, you should be using css. give the "string" class a width in ems or %. Stylize the font by setting font-size: 85%; or you can set it to a certain number of ems or pt. On Feb 5, 12:20 pm, sveinh wrote: > Thanks Massimo > > Your hint pointed me in the right direction.  It had a few topos,

[web2py] Re: Login form

2010-02-05 Thread sveinh
Thanks Massimo Your hint pointed me in the right direction. It had a few topos, which I correct below. {{if not auth.user and not request.function=='user':}} {{form=auth.login(next=URL(r=request, args=request.args))}} {{pass}} This displays the default render of

[web2py] Re: Login form

2010-02-05 Thread mdipierro
in layout.html {{if not auth.user and not request.function=='user':}} {{=atuh.login(next=URL(r=request,args=args))}} {{pass}} On Feb 5, 3:40 am, sveinh wrote: > Hi all > > I would like to include a username+pw field and login button on all > pages if the user is not already logged in. I would li