[albatross-users] Wiki example and related extension: iterate over ctx/session

Andrew McNamara andrewm at object-craft.com.au
Tue Jul 8 15:00:44 EST 2003


>It sure wouldn't hurt, but it's not ideal - because in order to access the
>sessions names from a template, you need to put them into the ctx.locals -
>and do it at just the right time in the process so that you get the
>correct answer.  (session_vars() will return a copy, so won't be updated
>as session vars are added/deleted.)

I'm not really sure what people are getting at here - ctx.add_session_vars() 
simply controls which attributes of ctx.locals are pickled - I can't see
why you'd want to modify the return from session_vars() any way other
than via ctx.(add|del)_session_vars()?

>This also means in order to put debugging in, you need to edit the
>page_display function as well as the template.

If it's debugging, it's probably better just to put a bunch of writes
to sys.stderr in the page module, rather than modifying the template
(particularly with complex templates).

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



More information about the Albatross-users mailing list