Hi

I'm having trouble with values set in a Beaker session not being
available during the next request. Ive followed the advice on running
wsgi in daemon mode in:

http://groups.google.com/group/webpy/browse_thread/thread/88d5675f954c924d/a424ff5cb678da8d#a424ff5cb678da8d

which would appear to have had the correct impact since when I look
through web.ctx.enviroment I see wsgi.multiprocess --> False.

It still doesn't make the value retrievable though. If I dump the
content of the environment just after logging in I get:

beaker.session --> {'authenticated': '"womble"'}

after redirecting I get

beaker.session --> {}

Truncated code:

import types
import smtplib
import web
import psycopg2
import psycopg2.extras
from cStringIO import StringIO
from beaker.session import SessionMiddleware

urls = (
        '/list', 'list',
        '/sessiondump', 'sessiondump',
)

class list:
        def GET(self):
                if 'authenticated' in
web.ctx.environ['beaker.session']:
                        for FieldName, FieldValue in
web.ctx.environ.iteritems():
                                print FieldName + ' --> ' +
`FieldValue` + '<br/>'
                else:
                        print 'What\'s the magic word?<br/><form
method="POST"><input type="password" name="pwd"><br/><input
type="submit"></form>'

        def POST(self):
                if 'pwd' in web.input():
                        if '\/\/0mble' == web.input()['pwd']:
                                web.ctx.environ['beaker.session']
['authenticated'] =  '"womble"'
                                web.ctx.environ['beaker.session'].save

                                #web.seeother('/list')

                                for FieldName, FieldValue in
web.ctx.environ.iteritems():
                                        print FieldName + ' --> ' +
`FieldValue` + '<br/>'

                        else:
                                print 'No, that is not the magic word'

Can anyone tell me what I'm missing?

Thanks

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