quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Chichak <c...@kit.tomsk.ru>
Subject psp 2 str diff
Date Thu, 08 Jul 2004 15:00:51 GMT
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

Mime
View raw message