How can I expose method with genshi text template?

10 views
Skip to first unread message

Victor

unread,
Jul 31, 2009, 12:18:10 PM7/31/09
to TurboGears
Hi,

I want to expose some of my method with genshi text template. How can
I do that?

For example:

@expose("myproject.templates.foojavascript.js"):
# do something here
return dict(data = "[1, 2, 3]");

foojavascript.js:

var data = ${data}


It might looks like this. I want to do that with TurboGears2, how to
do?

thanks.
Victor Lin.
Reply all
Reply to author
Forward
0 new messages