Petr Jakes schrieb:
> Hi,
> what is the easiest way to show the picture stored on the remote url
> (not on the machine where the TG is running), on the TG generated
> pages? I mean I do not want to download and store this picture
> locally, rather I would like to pass it to the kid template and show
> it dynamically
>
> Till now I am able to do:
> raise tg.redirect("%s" % urlString)
> but it shows the picture on the requested url (it redirect the web
> browser to the url page).
> I would like to have the picture on my own (kid) page.
Maybe you are just thinking to complicated? Just use a normal HTML image
link:
<img src="http://someserver/foo/img.png" />
If you need to put dynamic elements in the image URL, use Kid
placeholder expressions.
Example: assuming you pass "dict(chart_data=[30,20,50])" to the template
from your controller, you could insert a nice google chart with the
following template code:
<img
src="http://chart.apis.google.com/chart?chs=250x150&cht=p3&chd=t:${','.join(chart_data)}"
/>
HTH, Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---