> > You may comment out the line: auth.settings.create_user_groups = False if > you're getting the table-not-exist error and that should fix it. > > As you can see above, I also setup the email account credentials (though > dummy ones in the code above) in the model, and have tested those > credentials against actual Gmail login. I have not explicitly tested it > using Web2py, but expect them to work given the description in the manual. > Thanks! >
Sorry, I can't reproduce either problem. I put your exact code in a fresh app and didn't get either error using SQLite. You named the group table "user_group", so I don't know why you would get an error saying the "auth_group" table doesn't exist -- the Auth code never refers directly to that name except when setting the default value of settings.table_group_name (which you have overridden). So, you should only get that error if auth.settings.table_group_name is somehow being changed to "auth_group" after the table definitions but before the auth.add_group() call. Also, don't do: auth.add_group('students', 'students') auth.add_group('teachers', 'teachers') That will keep creating new "students" and "teachers" groups on every request. You have to check to see if the groups are there, and only add them if they're not. But that's not efficient because it will still happen on every request -- so instead, you should probably just add these groups once outside your app code. As for email, it works fine for me when I use my Gmail credentials. There must be something wrong with your configuration. To play around with it, trying opening a web2py shell: python web2py.py -S yourapp -M -N In the shell, you can access the "mail" object defined in the model and trying sending a test email: mail.send(to='someaddr...@gmail.com', message='test') (The email address should be a valid address you can access.) If it prints an error and returns False, there's something wrong with your email configuration. You can play around with it by directly changing mail.sender, mail.server, and mail.login in the shell and trying again. Anthony