* martin f krafft [23:13 11/05/03 CEST]:
i have a python script that ends with
return getattr(context, 'a_page_template', None).render()
this works like a charm, rendering the page template and outputting it as if the python script produced it.
however, i am not sure how i can pass some information (e.g. a username) to the page template. so far i have been using the REQUEST object, but that's an ugly hack, and it also doesn't work (see previous post), so i'd like to do it right. how?
I think you can do that : in your python script : return context.a_page_template(username='John Doe', list=['a' , 'b']) in your page template : Hello, I'm <span tal:replace="options/username">Whoever</span>. And I say : <span tal:repeat="item options/list"> <span tal:replace="item">foo</span> </span> -- (°> Nicolas Évrard / ) Liège - Belgique ^^