Which problem are you having?

Em sexta-feira, 24 de março de 2017 15:20:31 UTC-3, PK escreveu:
>
> @request.restful()
> def api():
>     response.view = 'generic.json'
>     def GET(*args,**vars):
>         patterns = [
>             "/wishBoxes[wishBoxes]",
>             "/wishBoxes[wishBoxes]/{wishBoxes.name.startswith}",
>             "/boxes[Details]/{Details.Title_id}"
>             ]
>         parser = db.parse_as_rest(patterns,args,vars)
>         if parser.status == 200:
>                 return dict(wishBoxes=parser.response)
>         else:
>             raise HTTP(parser.status,parser.error)
>
> how shuould i return depanding on request table name 
> /api/wishBoxes which return return dict(wishBoxes=parser.response) 
> /api/boxes/1 which return return dict(boxes=parser.response) 
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to