Guys, I'm having a problem picking up the user entry in webpy from the
JQuery Autocomplete plugin's 'q' parameter.  The error recieved is:

Traceback (most recent call last):
  File "c:\python25\lib\site-packages\web\webapi.py", line 304, in
wsgifunc
    result = func()
  File "c:\python25\lib\site-packages\web\request.py", line 131, in
<lambda>
    func = lambda: handle(inp, fvars)
  File "c:\python25\lib\site-packages\web\request.py", line 61, in
handle
    return tocall(*([x and urllib.unquote(x) for x in args] + fna))

TypeError: GET() takes exactly 1 argument (2 given)
localhost - - [07/Apr/2008 06:46:19] "GET /ac/?q=g&limit=150 HTTP/1.1"
200 -


Here is the code:

class index():
        def GET(self):
            web.header("Content-Type", "text/html;
charset=iso-8859-1")
            print render.ac()    # display data entry form
            return

        def POST(self):
            i = web.input()
            """
            An Autocomplete entry sends the 'q' parameter which is
what the user entered and the 'limit' parameter.  From above
Traceback, eg. "GET /ac/?q=g&limit=150 HTTP/1.1"
            """
            web.debug(i)
            q = i[1]            # how do I pickup the q=a and
limit=150 parameters?
            limit = i[2]
            return

Thanks!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to