mod_python has empty POST

Discussion in 'Python' started by Lucas Branca, Dec 29, 2003.

  1. Lucas Branca

    Lucas Branca Guest

    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
     
    Lucas Branca, Dec 29, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rod Castellanos
    Replies:
    1
    Views:
    455
  2. Rod Castellanos
    Replies:
    2
    Views:
    771
    Steve Holden
    Jun 7, 2005
  3. blbmdsmith
    Replies:
    1
    Views:
    671
    Graham Dumpleton
    Dec 14, 2006
  4. Replies:
    3
    Views:
    3,292
  5. Adam
    Replies:
    8
    Views:
    464
Loading...

Share This Page