Re: [web2py] Re: Auth_user add username field

2016-03-28 Thread Sukrut Joshi
how to set string size in sql form db.define_table('stud_personal', Field('phone_no',string(10), requires=IS_NOT_EMPTY())) is it correct? On Thu, Mar 24, 2016 at 7:21 AM, Michael Beller wrote: > yes - I think something like this could/should work: > > db.auth_user.first_name.

[web2py] Re: Auth_user add username field

2016-03-23 Thread Michael Beller
yes - I think something like this could/should work: db.auth_user.first_name.readable = False On Wednesday, March 23, 2016 at 8:49:42 PM UTC-4, Jerry Liu wrote: > > Thanks! It worked! > > I also want to hide First and Last Name fields. At least, I don't want > them to be shown on the registrat

[web2py] Re: Auth_user add username field

2016-03-23 Thread Jerry Liu
Thanks! It worked! I also want to hide First and Last Name fields. At least, I don't want them to be shown on the registration page. Any ideas? On Wednesday, March 23, 2016 at 5:43:14 PM UTC-7, Michael Beller wrote: > > no changes should be required to any controller or view. Everything is > h

[web2py] Re: Auth_user add username field

2016-03-23 Thread Michael Beller
no changes should be required to any controller or view. Everything is handled by the line: return dict(form=auth()) in the default controller (in combination with the default/user.html). The line in db.py just tells auth whether to use a username or email. On Wednesday, March 23, 2016 at 8:16

[web2py] Re: Auth_user add username field

2016-03-23 Thread Jerry Liu
Not sure if I understood, you mean I still have to make changes on View and Controller, right? because adding this line doesn't change anything on login and registration views. On Wednesday, March 23, 2016 at 4:12:49 PM UTC-7, Michael Beller wrote: > > It's easier than that ... just change usern

[web2py] Re: Auth_user add username field

2016-03-23 Thread Michael Beller
It's easier than that ... just change username=True in db.py, all the web2py components (e.g., log in form, auth_user table, log in menu, etc.) will now support username ... auth.define_tables(username=True, signature=True) On Wednesday, March 23, 2016 at 5:46:38 PM UTC-4, Jerry Liu wrote: >