Thanks Marko, yes it works!
@expose(content_type=CUSTOM_CONTENT_TYPE)
def svg_graph(self, n):
response.headers["Content-type"] = "image/svg+xml"
g = Graph.Full(int(n), directed=False, loops=False)
ntf = NamedTemporaryFile()
etc.
<embed src="${tg.url('/svg_graph', n=tmpl_context.n )}"
type="image/svg+xml" />
@expose("pkg.templates.simplegraph")
def embed_svg(self):
tmpl_context.n = 12 #This var str not int!
return dict()
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected].
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=.