Hi Victor, In data mercoledì 24 febbraio 2010 14:09:15, Victor Engmark ha scritto: > Hi all, > > I'm just wondering if the form object that is passed to > WebInterface*Pages objects is standardized, and if so, whether there > is any documentation for it. E.g., does it contain more than the HTML > form values, how are the values encoded, how are multiple values > (?foo=bar&foo=baz) handled, how to get the form values in the same > sequence as they appeared in the form, etc.?
so actually the form export the dictionary interface, although it's not really a dictionary. It's generated after merging the GET parameters and the POST data in webinterface_handler_wsgi_utils.py and the code was borrowed from the previous mod_python implementation, so you can find its documentation here: <http://www.modpython.org/live/current/doc-html/pyapi-util-fstor.html> Form is indeed an instance of this FieldStorage class. Normally you would wash its content via webinterface_handler.wash_urlargd to obtain a clean dictionary with keys and values of the type you would expect. I think if you expect multiple values and you specify in wash_urlargd something like $ argd = wash_urlargd(form, {"foo": (list, [])} you should obtain in argd["foo"] a list of strings. Cheers! Sam -- Samuele Kaplun ** CERN Document Server ** <http://cds.cern.ch/>
