On Mon, Apr 7, 2008 at 5:57 PM, dineshv <[EMAIL PROTECTED]> wrote:
>  urls = (
>     '/', 'index',
>     '/returnResults', 'returnResults',
>
> )
>
>  class index():
>         def GET(self):
>                 web.header("Content-Type", "text/html;
>  charset=iso-8859-1")
>                 print render.ac()
>
>                 return
>
>         def POST(self):
>                 i = web.input()
>
>                 web.debug(i)
>                 q = i.q
>                 limit = i.limit
>                 web.seeother('/returnResults')
>                 return
>
>  Yes, so far?
>
>  Next, using 'q' I search a database and/or list and return 'results'
>  back to the JQuery autocomplete.  Now, is this done with another
>  GET(self) within class index() or as a separate class?  I assume a
>  separate class returnResults
>
>  class returnResults():
>         def GET(self):
>                 # using 'q' get results = subset of data
>                 results = simplejson.dumps(subsetData)
>                 print results
>                 return
>
>  Does this look okay?

Yeah, that looks good.


-- 
Hermann Käser
http://theragingche.com/
http://semicir.cl/user/hermzz

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