web.input(_method="POST") works well, but I want to avoid this multiple select http://groups.google.com/group/webpy/browse_thread/thread/f153aa475d9014c3 problem. I was finally able to solve my problem after reading this http://stackoverflow.com/questions/530526/accessing-post-data-from-wsgi and the Python docs about cgi.FieldStorage. I have now put "e['QUERY_STRING'] = ''" (on 242) before "if e['REQUEST_METHOD'] in ['POST', 'PUT']:" which perfectly solves all of my problems. I would like to see this fix included in Web.py 4.0:)
Thanks On Oct 18, 4:24 am, Anand Chitipothu <[email protected]> wrote: > 2010/10/17 sibande <[email protected]>: > > > Hi > > > I have a keyword that is available both on GET and on POST (/search? > > word=webpy and post data word=python). > > The problem is rawinput seems to create a list of the two words even > > if if I tell it to use the post one like so rawinput('POST'). > > I went to webapi.py and tried to print method.lower() which printed > > two lines on my screen "both" and then "POST". I don't know if this is > > how it's supposed to behave or I'm doing something wrong. > > I also noticed that rawinput('GET') works as expected. > > You can try using: > > web.input(_method="GET") > web.input(_method="POST") -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
