[Zope] Re: Displaying Graphs using TAL
Andreas Jung
lists at zopyx.com
Fri May 30 05:07:55 EDT 2008
--On 30. Mai 2008 10:20:28 +0200 Encolpe Degoute
<encolpe.degoute at ingeniweb.com> wrote:
> 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///88PD9WqsYmApmZmZtZfY
> mdakyH5BAQUAP8ALAAAAABQAA8AAAPb
>
> WLrc/jDKSVe4OOvNu/9gqARDSRBHegyGMahqO4R0bQcjIQ8E4BMCQc930JluyGRmdAAcdiigM
> LVr
>
> ApTYWy5FKM1IQe+Mp+L4rphz+qIOBAUYeCY4p2tGrJZeH9y79mZsawFoaIRxF3JyiYxuHiMGb
> 5KT
>
> kpFvZj4ZbYeCiXaOiKBwnxh4fnt9e3ktgZyHhrChinONs3cFAShFF2JhvCZlG5uchYNun5eed
> RxM
>
> AF15XEFRXgZWWdciuM8GCmdSQ84lLQfY5R14wDB5Lyon4ubwS7jx9NcV9/j5+g4JADs=">
>
>
Ouch :-)
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20080530/3e340af4/attachment.bin
More information about the Zope
mailing list