On Monday 20 June 2005 11:39, Nicolas Legault wrote:
> After examining the worldcookery PDF example, I see how to implement the
> generation of the image, what I don't understant is how to include this in
> an HTML with a form and pass these value to the graph function.
> A long time ago I've implemented a web page like this in 100% pure code and
> what I've done was:
> - Examine the GET/POST to get passed parameter.
> - used default value for blank parameter.
> - create the graph and write it on a temporary name on HD.
> - construct the HTML returned code with a <img src="..."> pointing to the
> - return the code to the remote browser.
You want to write two views. One that displays the graph and the form and
another that generates the graph. There are several options here:
1. You have a custom content object that stores the configuration from the
HTML. During image generation, you simply use the data.
2. The HTML data is simply encoded in the image source URL and is used by the
image generating view:
<img src=".../graph.jpg?x-axis-max=20&..." />
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-users mailing list