The first place where I always search for help is *THE ORACLE* :

http://www.google.com/codesearch/p?hl=en#uyCl3L51_dI/gluon/contrib/login_methods/gae_google_account.py&q=GaeGoogleAccount%20package:http://web2py%5C.googlecode%5C.com

class GaeGoogleAccount(CasAuth):    """    Login will be done via
Google's Appengine login object, instead of web2py's    login form.
Include in your model (eg db.py)::        from
gluon.contrib.login_methods.gae_google_account
<#uyCl3L51_dI&q=file:(/%7C%5E)gluon/contrib/login_methods/gae_google_account(/__init__)%3F%5C.py$&exact_package=http://web2py.googlecode.com/hg/&is_navigation=1>
import \            GaeGoogleAccount
auth.settings.login_form=GaeGoogleAccount()    """


So if you are out of GAE and need to Auth using GMAIL you have to use
*email_auth
or RPX ( rpx can auth with a wide range of accounts, facbeook, twitter,
gmail...)*

http://www.google.com/codesearch?q=email_auth+package:http://web2py\.googlecode\.com&origq=email_auth&btnG=Search+Trunk



def email_auth(server="smtp.gmail.com:587",
domain="@gmail.com"):    """    to use email_login:    from
gluon.contrib.login_methods.email_auth
<#uyCl3L51_dI&q=file:(/%7C%5E)gluon/contrib/login_methods/email_auth(/__init__)%3F%5C.py$&exact_package=http://web2py.googlecode.com/hg/&is_navigation=1>
import email_auth
<#uyCl3L51_dI&q=file:(/%7C%5E)gluon/contrib/login_methods/email_auth/email_auth(/__init__)%3F%5C.py$&exact_package=http://web2py.googlecode.com/hg/&is_navigation=1>
   auth.settings.login_methods.append(email_auth("smtp.gmail.com:587",
                                                 "@gmail.com"))    """




2010/8/10 Bruno Rocha <rochacbr...@gmail.com>

> You cannot import "appengine.api" if you're out of GAE environment..
>
>
>
> 2010/8/10 Fale <floc...@grimp.eu>
>
> Hi,
>> I'm a new web2py user :)
>> I'm trying to use google's auth for my app, but it does not work on
>> web2py, while it works perfectly on appspot.com and on the offline gae
>> engine :|
>>
>> My code:
>> from gluon.tools import Mail, Auth, Recaptcha
>> auth = Auth(globals(), db)
>> from gluon.contrib.login_methods.gae_google_account import
>> GaeGoogleAccount
>> auth.settings.login_form = GaeGoogleAccount()
>> auth.define_tables()
>> auth.settings.create_user_groups = False
>> auth.settings.mailer = mail
>>
>> On Web2py:
>> Traceback (most recent call last):
>>  File "/home/web2py/grimpuis/gluon/restricted.py", line 178, in
>> restricted
>>    exec ccode in environment
>>  File "/home/web2py/grimpuis/applications/init/models/dbs.py", line
>> 100, in <module>
>>    from gluon.contrib.login_methods.gae_google_account import
>> GaeGoogleAccount
>>  File "/home/web2py/grimpuis/gluon/contrib/login_methods/
>> gae_google_account.py", line 12, in <module>
>>    from google.appengine.api import users
>> ImportError: No module named appengine.api
>>
>> Someone has some ideas to fix it?
>>
>> Thankyou in advance to anyone =)
>>
>> PS: As far as I seen there isn't a unique place where is stored all
>> the web2py-gae knowledge. Am I blind or we really lack something like
>> it?
>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br

Reply via email to