Re: [Zope3-Users] Complex views implementes in Python

2005-06-23 Thread Stephan Richter
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  pointing to the
> graph
> - 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:

  

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Complex views implementes in Python

2005-06-20 Thread Nicolas Legault
I'd like to develop a page that is most like the PDF example in Phillip's
worldcookery but with some modification parameter

Here is what I want:

Construct a page that will have a graphic image (JPEG for example) with a
form under the graph that can control some parameter to generate the graph,
like a dates for intervals of the X axis, maximum and minimum for Y axis.

What I need from the user's point of view:

1- the user will load the page and see a graph with default parameter
(today's date...) and a form under the graph with empty fields.
2- the user can enter some data in these fields and leave others blank
(default will be used for field leaved blank)
3- the user click the submit button and the new graph appear with, again,
the form under the image.


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  pointing to the
graph
- return the code to the remote browser.


Thanks in advance.

Nicolas Legault
Immo-Controle Inc.
Chambly, Quebec, Canada
514-272-3453 Ext 2

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users