[web2py] Re: auth_user change field order

2019-04-22 Thread lucas
ok, i finally found what was wrong.  i didn't realize there were two such 
settings.  i was using the profile_fields and testing it on the register 
screen.  so, i have this now under the db.py model:

auth.settings.register_fields = ['prefix_title', 'first_name', 'last_name', 
'gender', 'birthdate', 'zip', 'email', 'password']
auth.settings.profile_fields = ['prefix_title', 'first_name', 'last_name', 
'gender', 'birthdate', 'zip', 'email']

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: auth_user change field order

2019-04-08 Thread Anthony
Definitely works for me. Are you using the built-in Auth profile 
functionality? If so, you'll have to do some debugging -- check 
/gluon/tools.py around line 3646 (where the profile form is created and 
auth.settings.profile_fields is passed to SQLFORM.

Note, you can also create a custom form in the view.

Anthony

On Monday, April 8, 2019 at 10:20:27 AM UTC-4, lucas wrote:
>
> i tried this before and after auth.define_tables and it had no effect:
>
> auth.settings.profile_fields = ['prefix_title', 'first_name', 'last_name', 
> 'gender', 'birthdate', 'zip', 'email']
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: auth_user change field order

2019-04-08 Thread lucas
and i also update web2py from 2.17 to 2.18.5, just in case.

On Monday, April 8, 2019 at 10:20:27 AM UTC-4, lucas wrote:
>
> i tried this before and after auth.define_tables and it had no effect:
>
> auth.settings.profile_fields = ['prefix_title', 'first_name', 'last_name', 
> 'gender', 'birthdate', 'zip', 'email']
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: auth_user change field order

2019-04-08 Thread lucas
i tried this before and after auth.define_tables and it had no effect:

auth.settings.profile_fields = ['prefix_title', 'first_name', 'last_name', 
'gender', 'birthdate', 'zip', 'email']

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: auth_user change field order

2019-04-08 Thread Anthony
auth.settings.profile_fields = ['prefix_title', 'first_name', 'last_name', 
...]

Anthony

On Monday, April 8, 2019 at 9:38:06 AM UTC-4, lucas wrote:
>
> hello one and all,
>
> i'm using web2py 2.17>.
>
> what is the best method to change the field order on the view's 
> user/profile and user/register when adding fields like???
>
> auth.settings.extra_fields['auth_user'] = [
> Field('prefix_title', length=4, 
> requires=IS_IN_SET(('Mr.','Ms.','Mrs.','Dr.')), comment='Enter your Name 
> Prefix.'),
> Field('birthdate', 'date', requires=NE, comment='Enter in Format: 
> "-MM-DD"'),
> Field('zip', length=9, requires=NE, comment='Your Zip or Postal 
> Code.'),
> Field('gender', length=6, default='FEMALE', 
> requires=IS_IN_SET(('FEMALE','MALE')), comment='Enter your Gender.'),
> Field('input_date', 'date', comment="format -MM-DD", requires=NE, 
> default=datetime.date.today(), writable=False, readable=False)
> ]
>
> thank you in advance.  lucas
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.