Hi, here are my next tries (yes, now from the English version of THE BOOK):

(1) In db.py I have added:

from gluon.contrib.login_methods.email_auth import email_auth
auth.settings.login_methods=[email_auth("smtp.gmail.com:587", "@gmail.com"),
]

The Login-Form and the Register-Form look like usual, but after sending I
got:

Traceback (most recent call last):
   File "/etc/web2py/gluon/restricted.py", line 194, in restricted
     exec ccode in environment
   File "/etc/web2py/applications/alt_login/controllers/default.py", line
71, in <module>
   File "/etc/web2py/gluon/globals.py", line 148, in <lambda>
     self._caller = lambda f: f()
   File "/etc/web2py/applications/alt_login/controllers/default.py", line
33, in user
     return dict(form=auth())
   File "/etc/web2py/gluon/tools.py", line 1119, in __call__
     return getattr(self,args[0])()
   File "/etc/web2py/gluon/tools.py", line 1826, in register
     group_id = self.add_group("user_%s" % form.vars.id, description)
   File "/etc/web2py/gluon/tools.py", line 2494, in add_group
     group_id = self.settings.table_group.insert(
AttributeError: 'NoneType' object has no attribute 'insert'

---------------------------

(2) And another try with Google Login:

from gluon.contrib.login_methods.gae_google_account import GaeGoogleAccount
auth.settings.login_form = GaeGoogleAccount()


THE BOOK says   gae_google_login , but there is only a  gae_google_account
file.

The is a new ticket:

Traceback (most recent call last):
   File "/etc/web2py/gluon/restricted.py", line 194, in restricted
     exec ccode in environment
   File "/etc/web2py/applications/alt_login/models/db.py", line 108, in
<module>
     from gluon.contrib.login_methods.gae_google_account import
GaeGoogleAccount
   File "/etc/web2py/gluon/custom_import.py", line 294, in __call__
fromlist, level)
   File "/etc/web2py/gluon/custom_import.py", line 78, in __call__ level)
   File "/etc/web2py/gluon/contrib/login_methods/gae_google_account.py",
line 12, in <module>
     from google.appengine.api import users
   File "/etc/web2py/gluon/custom_import.py", line 294, in __call__
fromlist, level)
   File "/etc/web2py/gluon/custom_import.py", line 78, in __call__ level)
ImportError: No module named google.appengine.api


Any ideas?
Regards, Martin

Reply via email to