[Zope] need a webpage that will process a parameter list by calling a python function.

Oliver Bleutgen myzope@gmx.net
Thu, 27 Jun 2002 17:09:00 +0200


Hi David

David Meltzer wrote:
> hello,
> i need to do the following.
> i have a device that will try to load a webpage using the following url, for
> example:
> http://192.168.8.34//Examples/RNA/addEntry.html?IP=192.168.8.34&MAC=00-05-5D
> -F0-FE-D4&URL=http%3A%2F%2Fcnn.com%2F
> 
> note that it references an actual web page since it must have the .html
> extension. i cannot have it point directly to a dtml method. i must use a
> web page to process the request.

Nah, zope's objects can have ids with dots in it, it's just that it is 
more inconvenient to call them from python(-scripts).

> when zope processes the request, i want the web page to call a python method
> to process the url parameter list.

Just add your folder /Examples/RNA
and add a pythonscript in them called addEntry.html - python scripts are 
able to get to variables passed with request.
In the script you can use something along the lines of

my_params = context.REQUEST.form
IP = my_params['IP']
MAC = my_params['MAC']
...

<data_processing_code>


HTH,
oliver