But what if there is not GAE environment, although most unlikely. The
action wouldn't return a valid form (I guess)
You could test for request.env.web2py_runtime_gae and serve the form
in case it's appropiate

On Mar 8, 9:44 pm, sungchi <[email protected]> wrote:
> I want to separation of the default login and google login.
>
> *models/db.py:*
> from gluon.contrib.login_methods.gae_google_account import GaeGoogleAccount
>
> *view/default/googlelogin.html:*
> {{=form}}
>
> *controller/default.py*
> def login():
>     if auth.user_id:
>         redirect(session.old_referer)
>     login_form=author_func()
>     return dict(login_form=login_form)
> def googlelogin():
>     auth.settings.login_form=GaeGoogleAccount()
>     return dict(form=auth.login(next=URL(r=request, c='default',
> f='index')))
>
> Thanks.

Reply via email to