The session requires an explicit save() call before changes are persisted.

http://turbogears.org/2.0/docs/main/Session.html

On Tue, Apr 7, 2009 at 6:24 AM, Sanjay <[email protected]> wrote:
>
> Hi,
>
> I went through the documentations etc. but could not find how exactly
> to use sessions in TG2. As a substitute of cherrypy.session, I tried
> tg.session and pylons.session, and wrote some code like this:
>
> from pylons import session
> .
> .
> .
>
>   �...@expose('...')
>    def index(self):
>        session['foo'] = 'Sanjay'
>        return dict(page='index')
>
>   �...@expose('...')
>    def about(self):
>        return session['foo']
>
> .
> .
> .
>
> Then, while running http://xxx/index and then http://xxx/about,
> key_error comes.
>
> Seeking help.
>
> thanks,
> Sanjay
>
> >
>



-- 
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to