[mod_python] strange behavior of form + patch for mod_python

Rafal Zawadzki bluszcz at jabberpl.org
Sat Nov 26 03:36:17 EST 2005

Hi. I am using modpython+psp. Let's take a short psp example:

if form.has_key('testkey'):
<form action="dupa.psp" method="get" enctype="multipart/form-data">
<input type="checkbox" name="testkey" value="1">
<input type="checkbox" name="testkey" value="2">
<input type="submit">

When i set one checkbox, form['testkey'] result is key. When I set two or 
more, this is a list. IMVHO it is a BIG bug. I patched my modpython to give 
always a list:

bluszcz at idoru:$ diff util.py util.py.orig
<             return found
>             return found[0]
bluszcz at idoru:$

but i understand why it was like that. Anyone got an idea?


 __     __   Rafał Zawadzki [jid/mail: bluszcz at jabberpl.org, skype: blvszcz]
|  |--.|  |.--.--.-----.-----.----.-----. [www: http://bluszcz.jabberpl.org]
|  _  ||  ||  |  |__ --|-- __|  __|-- __| [ http://pyrss.jabberstudio.org/ ]
|_____||__||_____|_____|_____|____|_____|                 つた 

More information about the Mod_python mailing list