[albatross-users] context locals question

Andrew McNamara andrewm at object-craft.com.au
Thu Oct 24 11:11:32 EST 2002


>   Let me first say that I absolutely love this toolkit... after hanging 
>on with Zope for years, and seeing it get more and more complex and 
>unmanageable, this is just what the doctor ordered.
>
>Anyway... I am using a couple of variables that I am putting into 
>ctx.locals, each one is a dictionary that I use for menu structures on 
>the web site. One is a menu that stays the same and one is a menu that I 
>want to be context dependent.  The problem seems to be that if I don't 
>explicitly set this dict in every page module, it goes reverts back to 
>the empty dict that I first initialized. What I have tried to do is 
>create a get and set method at the context level, but this doesn't 
>always seem to work. Is there some other place I should be trying to 
>keep track of a value like this context dependent menu?

Are you calling ctx.add_session_vars( ... ) for the variables in question?

Which context mixin are you using?

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list