RE: [Zope] Processing form data.
3: I will also need to url encode my data. Can Zope handle that / is there a module for it somewhere?
Does the standard python module urllib do what you want? http://www.python.org/doc/current/lib/module-urllib.html
4: Im scetching on a simple python module that implements some of the stuff found in CGI.pm Would that be useful to other Zopers or am I doing somthing already done better by others?
I don't quite understand this question. Zope *IS* a CGI "script". All of the CGI functionality is available. Most of it has higher-level support, so you don't usually need to do much at the primitive CGI level.
Terrel Shumway wrote:
3: I will also need to url encode my data. Can Zope handle that / is there a module for it somewhere?
Does the standard python module urllib do what you want? http://www.python.org/doc/current/lib/module-urllib.html
4: Im scetching on a simple python module that implements some of the stuff found in CGI.pm Would that be useful to other Zopers or am I doing somthing already done better by others?
I don't quite understand this question. Zope *IS* a CGI "script". All of the CGI functionality is available. Most of it has higher-level support, so you don't usually need to do much at the primitive CGI level.
You're quite right, but what I really meant was that I'm writing a module that offers shorthands for html formatting which I use when I write external methods. The main advantages with CGI.pm that I'm trying to mimic is that you can keep your html / dtml and the processing script together. I also feel that a lot of: print "<tag name='blablalbla' etc=...'> " + some.content + "</tag>" makes the code real ugly ..so my module allows me to do things like this def form: form = Form("some_action") sel = Select("name") form.add_item(sel) for item in Defs.My_List: sel.add_item(Option(item)) form.add_item(Input("Name", "Type")) form.add_item(Input("Submit", "SUBMIT", [], "OK")) return str(form) If anyone is interested, I can publish it somewhere. -Fredrick -- ========================================== Fredrick Rybarczyk Research Engineer NetLab, Lund University
On Wed, 1 Sep 1999, Fredrick Rybarczyk - LUB NetLab wrote:
Terrel Shumway wrote:
3: I will also need to url encode my data. Can Zope handle that / is there a module for it somewhere?
Does the standard python module urllib do what you want? http://www.python.org/doc/current/lib/module-urllib.html Well, what about <dtml-var testvar url_quote> ?
You're quite right, but what I really meant was that I'm writing a module that offers shorthands for html formatting which I use when I write external Well, CGI parsing support is in the standard library.
HTML generating can be done either over one long string with formatting: """ <html> <head> ... ... <IMG SRC="%(imgurl)s"> ... </html>""" % {'imgurl':'someurl', ...} Alternativly, one can use the way you sketched out. For this I would use the HTMLgen library, which comes with a complete OO design to makeing HTML documents. ;) Andreas -- Andreas Kostyrka | andreas@mtg.co.at phone: +43/1/7070750 | phone: +43/676/4091256 MTG Handelsges.m.b.H. | fax: +43/1/7065299 Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA
Fredrick Rybarczyk - LUB NetLab wrote:
You're quite right, but what I really meant was that I'm writing a module that offers shorthands for html formatting which I use when I write external methods. The main advantages with CGI.pm that I'm trying to mimic is that you can keep your html / dtml and the processing script together. I also [...] If anyone is interested, I can publish it somewhere. If your module can check a valid syntax for email-addresses and if its able to filter bad characters...yo can hear me cry: HERE! I am interested :)
Juergen
participants (4)
-
Andreas Kostyrka -
Fredrick Rybarczyk - LUB NetLab -
Juergen Specht -
Terrel Shumway