Differences From Artifact [9c80a3439c]:
- File applications/mobileblur/models/db.py — part of check-in [cbc0649388] at 2011-11-20 03:03:33 on branch develop — Moved newsblur library from urllib to Requests. Moved username storage to the DB. Store cookie in the DB. Centralize a login function that checks the DB for a user's cookie on each page load and logs the user in if there's no cookie. (user: spiffy, size: 4718) [annotate] [blame] [check-ins using]
To Artifact [34c2cab0a7]:
- File applications/mobileblur/models/db.py — part of check-in [5a37a6a313] at 2011-11-20 05:13:42 on branch feature/web2py_auth — Removed NewsBlur login tracking from the database and instead just give the client a copy of their NewsBlur cookie (user: spiffy, size: 4711) [annotate] [blame] [check-ins using] [more...]
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + | ## - crud actions ## (more options discussed in gluon/tools.py) ######################################################################### from gluon.tools import Mail, Auth, Crud, Service, PluginManager, prettydate mail = Mail() # mailer auth = Auth(db) # authentication/authorization crud = Crud(db) # for CRUD helpers using auth service = Service() # for json, xml, jsonrpc, xmlrpc, amfrpc plugins = PluginManager() # for configuring plugins mail.settings.server = 'logging' or 'smtp.gmail.com:587' # your SMTP server mail.settings.sender = 'you@gmail.com' # your email mail.settings.login = 'username:password' # your credentials or None |
︙ | |||
82 83 84 85 86 87 88 | 83 84 85 86 87 88 89 | - | ######################################################################### db.define_table("users", Field("username"), Field("password"), Field("cookie") ) |