Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #47695

Re: Receing a form variable as a list instead of as a string

Newsgroups comp.lang.python
Date 2013-06-11 12:42 -0700
References <66c9a650-e7a0-46a4-92da-b08d1af3bd46@googlegroups.com> <8ifj8a-53i.ln1@satorlaser.homedns.org>
Message-ID <1a7c9670-db0c-4b94-a7f7-1c3e3944ec81@googlegroups.com> (permalink)
Subject Re: Receing a form variable as a list instead of as a string
From Νικόλαος Κούρας <nikos.gr33k@gmail.com>

Show all headers | View raw


Τη Τρίτη, 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Receing a form variable as a list instead of as a string Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-11 03:38 -0700
  Re: Receing a form variable as a list instead of as a string Andreas Perstinger <andipersti@gmail.com> - 2013-06-11 14:01 +0200
  Re: Receing a form variable as a list instead of as a string Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2013-06-11 13:51 +0200
    Re: Receing a form variable as a list instead of as a string Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-11 12:42 -0700
      Re: Receing a form variable as a list instead of as a string Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2013-06-11 13:16 -0700
        Re: Receing a form variable as a list instead of as a string alex23 <wuwei23@gmail.com> - 2013-06-11 18:06 -0700
      Re: Receing a form variable as a list instead of as a string alex23 <wuwei23@gmail.com> - 2013-06-11 16:47 -0700
    Re: Receing a form variable as a list instead of as a string nagia.retsina@gmail.com - 2013-06-11 18:29 -0700
      Re: Receing a form variable as a list instead of as a string Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-12 06:16 +0000

csiph-web