You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by Andrey Chichak <ch...@kit.tomsk.ru> on 2004/07/08 17:00:51 UTC
psp 2 str diff
Good Day!
After some using mod_python.publisher I began to use PSP fragments in my
pages.
Some modifications were made for more complex PSP generations, diff file
attached.
With this is posible such code :
tplbutton = psp.PSP2str(req, _tmpl_path('navbutton'))
indexb = tplbutton.run({'section' : 'index', 'name' : 'Start'})
searchb = tplbutton.run({'section' : 'search', 'name' : 'Search'})
And one more question :
Due to this code lines :
---------------------------------------------------
global_scope = globals().copy()
global_scope.update({"__out":out})
global_scope.update({"req":req,"session":session,
"form":form, "psp":psp})
global_scope.update(self.vars) # passed in __init__()
global_scope.update(vars) # passed in run()
---------------------------------------------------
variables 'req','session','form', 'psp' are overwriten with 'local
vars', I think it's not good idea in case of
psp.PSP('','',locals())
call.
Andrey Chichak