Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > mod_python has empty POST

Reply
Thread Tools

mod_python has empty POST

 
 
Lucas Branca
Guest
Posts: n/a
 
      12-29-2003
python 2.1.3
Debian woody
Apache 1.3.26
mod python 2.7.8

## ---- formtest.html ---- ##
<form action="/formtest.py/main" method="POST">
<input type="submit" value="go" name="action">
<input type="hidden" name="hide" value="A">
</form>


## ---- formtest.py ------ ##
import mod_python

def main(req):
form = mod_python.util.FieldStorage(req).list
vars = ''
for field in form:
if isinstance(field, mod_python.util.Field):
vars = "%s [%s] = %s" % (vars, field.name, field.value)
return(vars)

## ---- results ---- ##
if method is "POST" variable form is an empty list !!! <---- WRONG

if method is "GET" it's all right and I receive
a string containing : "[action] = go [hide] = A"

why I cannot access POST variables?????
... I'm bouncing like a ball ....
help!


Lucas


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache & mod_python: I don't receive anything with POST method tengounplanb@gmail.com Python 3 11-27-2008 03:23 PM
mod_python.so is garbled mod_python.so is garbled blbmdsmith Python 1 12-14-2006 12:15 AM
Multiple Form Post Using Javascript - Empty Post from FF Adam Javascript 8 11-24-2005 12:03 PM
PSP / mod_python ... how to get POST vars on .psp ? Rod Castellanos Python 1 06-07-2005 03:27 AM
PSP / mod_python ... how to get POST vars on .psp ? Rod Castellanos Python 2 06-07-2005 02:34 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57