Receing a form variable as a list instead of as a string
Νικόλαος Κούρας
nikos.gr33k at gmail.com
Tue Jun 11 15:42:02 EDT 2013
Τη Τρίτη, 11 Ιουνίου 2013 2:51:04 μ.μ. UTC+3, ο χρήστης Ulrich Eckhardt έγραψε:
>
> For that, you'd have to adjust the code that you received it from. If
> that's not possible, convert it to a string yourself. But didn't you
> want a "form variable"?
i manages to work around it by using this:
Indeed as Andreas said i was overusing the form variable 'page'
file = form.getvalue('file') # this comes from .htaccess
page = form.getvalue('page') # this comes form metrites.py or index.html
if not page and os.path.exists( file ):
# it is an html template
page = file.replace( '/home/nikos/public_html/', '' )
elif page or form.getvalue('show'):
# it is a python script
page = page
else:
#when everything else fails default
page = page
More information about the Python-list
mailing list