OK so changing if form.process().accepted to if form.accepted works for
user registers, if I remove it from if request.args(0)=='profile':
block, it is not triggered.
As far as flash message goes the flash works after user updates profile and
everywhere else on my page but after registration it seems to hate my code
and it decided to stay hidden/none :)

Thank you anyway




2017-05-10 21:14 GMT+02:00 Anthony <abasta...@gmail.com>:

> On Wednesday, May 10, 2017 at 3:14:08 AM UTC-4, Yebach wrote:
>>
>> How do you suggest I arrange my controller for user?
>>
>
> That's up to you, but for starters, maybe instead of putting all the logic
> in "if" blocks, make use of the Auth callback settings, such as
> auth.settings.register_onaccept. And for customizing the flash messages,
> use the auth.messages, such as auth.messages.registration_successful.
>
> Also, if form.process() has already been called, as in the case of the
> form object returned by auth(), you can check whether it has been accepted
> by doing:
>
> if form.accepted:
>
> You don't have to (and should not) call form.process() a second time.
>
> Anthony
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/Yfvnke6ABWM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Lep pozdrav

Vid Ogris

-- 
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.

Reply via email to