it work fine for me
i wrote here about that http://slav0nic.livejournal.com/29794.html
(rus lang B] )

from beaker.session import SessionMiddleware
import web
web.webapi.internalerror = web.debugerror

def session_mw(app):
   return SessionMiddleware(app)


urls = (

    '/', 'index',
)

class index:

    def GET(self):
        session = web.ctx.environ['beaker.session']
        if not session.has_key('value'):
                session['value'] = 0
        session['value'] += 1
        print (session['value'], session.is_new, session.type)
        session.save()

if __name__ == '__main__':
   web.run(urls, globals(),*(web.reloader, session_mw))

On Oct 31, 10:18 am, ambre <[EMAIL PROTECTED]> wrote:
> On Oct 30, 11:19 am, ambre <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Oct 29, 2:41 pm, slav0nic <[EMAIL PROTECTED]> wrote:
>
> > > what modules use for session/authorization - authkit, beaker, session,
> > > barrel, flup?
> > > any examples?
> > > i think authkit the best, but i can find only pylons examples =\
>
> > Firstly I used flup, now I'm using Beaker.
>
> > from beaker.session import SessionMiddleware
> > self.session = web.ctx.environ['beaker.session']
>
> > def session_mw(app):
> >    return SessionMiddleware(app)
>
> > if __name__ == '__main__':
> >    web.run(pfade, globals(), web.reloader, session_mw)
>
> > Make sure to call session.save() before the wsgi-application finishes.
>
> While testing my web-application I noticed that the same session
> is used for different clients. This occurs only when I use Beaker in
> conjunction with webpy. For a web-application without webpy
> the session management with Beaker works fine.
>
> Thus for webpy applications I switched back to flup.
> Did one get the same experiences for Beaker and webpy?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to