[Zope] Re: Displaying Graphs using TAL

Encolpe Degoute encolpe.degoute at ingeniweb.com
Fri May 30 04:20:28 EDT 2008


Andreas Jung a écrit :
> 
> 
> --On 30. Mai 2008 12:38:21 +0530 Andyy
> <ggirotra at gmail.com> wrote:
> 
>> i am preparing graphs(MatPlotLib) related files using external methods.,
>> when i test them on zope they display very well there.
>>
>> But when i call these external methods using tal as:
>>
>> <Img tal:attributes="src python: context.IterationBar(context) "/>
>> where IterationBar is my external method that displays a BarChart.
>>
>> Or using
>>
>>  <img src="/Agile/image.gif"
>>    tal:attributes="src context.IteartionBar(context)"/>
> 
> 1) the thing you're calling must return an *URL*
>   not the image data itself...think about how the <img>
>   in HTML works
> 
> 2) The script called through the given url must return the image
>   data _and_ it must set the proper http headers content-type,
>   and content-length

 If your site is only for FireFox or evolved browser you can use inline
rendering:
<img  width="81" height="85"
 src="data:image/gif;base64,R0lGODlhUAAPAKIAAAsLav///88PD9WqsYmApmZmZtZfYmdakyH5BAQUAP8ALAAAAABQAA8AAAPb

WLrc/jDKSVe4OOvNu/9gqARDSRBHegyGMahqO4R0bQcjIQ8E4BMCQc930JluyGRmdAAcdiigMLVr

ApTYWy5FKM1IQe+Mp+L4rphz+qIOBAUYeCY4p2tGrJZeH9y79mZsawFoaIRxF3JyiYxuHiMGb5KT

kpFvZj4ZbYeCiXaOiKBwnxh4fnt9e3ktgZyHhrChinONs3cFAShFF2JhvCZlG5uchYNun5eedRxM

AF15XEFRXgZWWdciuM8GCmdSQ84lLQfY5R14wDB5Lyon4ubwS7jx9NcV9/j5+g4JADs=">


-- 
Encolpe Degoute
INGENIWEB (TM) - S.A.S 50000 Euros - RC B 438 725 632
Bureaux de la Colline
1 rue Royal
92210 Saint Cloud
web : www.ingeniweb.com - « les Services Web Ingénieux »
Tel : 01.78.15.24.08 / Fax : 01 47 57 39 14



More information about the Zope mailing list