No, if your callback simply returns, then the rest of the Auth.login()
function will proceed -- it doesn't do anything with the return value of
the callback. If you want to immediately send a response to the browser,
you must either call redirect() or raise an HTTP() exception:
def check_login(form):
raise HTTP(200, HTML(BODY('%s<p>%s</p>' % (auth.user_id, 'test'))))
Anthony
On Saturday, April 13, 2013 8:47:38 PM UTC-4, lucas wrote:
>
> how come the following doesn't work? it should just return a simple page.
> just for testing for now...
>
> def check_login(form):
> return HTML(BODY('%s<p>%s</p>' % (auth.user_id, 'test')))
>
> auth.settings.login_onaccept = check_login
> auth.settings.register_onaccept = check_login
>
>
--
---
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/groups/opt_out.