That is what I have done, is place them in db.py. And that is what is not 
working. These are what I already have in my db.py:

auth.settings.remember_me_form=False
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.settings.login_after_registration = True
auth.settings.login_next = URL('site, 'accounts', 'index')
auth.settings.register_next = URL('site', 'accounts', 'index')

Its works for the ..default/user/register but not if I call the 
auth.register() form in a different location.

So, that is what I am needing: to get these same settings to also work when 
I call the auth.register() 

Thanks
-b

On Wednesday, June 6, 2018 at 5:01:30 PM UTC-4, Dave S wrote:
>
>
>
> On Wednesday, June 6, 2018 at 1:48:48 PM UTC-7, b.l. masters wrote:
>>
>> So by "auth.register() itself handles the form processing, automatic 
>> login, and redirect": Do you mean, that these functions are applied in the 
>> pre-processing (as you also mention), so I can't alter them??  Or can the:
>>
>> auth.settings.login_after_registration, 
>> auth.settings.registration_requires_verification, etc.
>>
>> work on the auth.register()? If yes, where/how? I tried placing these 
>> settings in the def index() at one point, and in the def user() and  
>> neither seemed to have any effect. Is there an example in the manual that 
>> illustrates how this would be done? I have looked and haven't found this.
>>
>> Thanks much
>>
>
> I would expect to do this in db.py, right after instantiating the auth 
> tables.  See the comments in 
> <URL:
> http://web2py.com/books/default/chapter/29/09/access-control#Renaming-Auth-tables
> >
> and note that
> <URL:
> http://web2py.com/books/default/chapter/29/09/access-control#Customizing-Auth
> >
> describes doing things right after 
>
> auth = Auth()
> which is typically in models/db.py.  Model files are evaluated for every 
> request.
>
> /dps
>
> You've probably seen the list of settings at
> <URL:
> http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages
> >
>
>
> /dps
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to