Receing a form variable as a list instead of as a string
Andreas Perstinger
andipersti at gmail.com
Tue Jun 11 08:01:43 EDT 2013
On 11.06.2013 12:38, Νικόλαος Κούρας wrote:
> but page is a form variable coming from a previous sumbitted form
> why the error says 'page' is a list?
RTFM:
"If the submitted form data contains more than one field with the same
name, the object retrieved by form[key] is not a FieldStorage or
MiniFieldStorage instance but a list of such instances. Similarly, in
this situation, form.getvalue(key) would return a list of strings."
http://docs.python.org/3.3/library/cgi.html#using-the-cgi-module
Bye, Andreas
More information about the Python-list
mailing list