> please add session cookies and session lib to main trunk
Beaker works pretty fine with webpy and it seems to be mature and is
the default for Pylons Framework.
http://pypi.python.org/pypi/Beaker/0.9.1
Example with Cookie only (webpy.dev):
import web
from beaker.middleware import SessionMiddleware
app = web.application(urls, globals())
main = app.wsgifunc()
main = SessionMiddleware(main, type='cookie', key='something4dev',
validate_key='superrandomsecret', encrypt_key='superrandomsecret',
secret='superrandomsecret', timeout=360, )
In your view you can do:
session = web.ctx.environ['beaker.session']
if not session.has_key('value'):
session['value'] = 0
session['value'] += 1
session.save()
> Dimi Shahbaz wrote:I agree, I'd like to get this in the main line, so I don't
> have to worry about the branches deviating too much.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---