At the moment it is: @request.restful() def as_rest(): def GET(*args,**vars): patterns = ['/{bookmarks.id}', ''] parsed = db.parse_as_rest(patterns,args,vars) if parsed.status==200: return parsed.response.json() else: posts = db().select(db.bookmarks.ALL) return response.render('posts/index.html', locals())
On Jun 16, 12:58 pm, Massimo Di Pierro <massimo.dipie...@gmail.com> wrote: > please show us your code. > > On Jun 15, 2:25 am, Web2py Newbie > > <swiawte...@garrifulio.mailexpire.com> wrote: > > As a follow up: > > > I want to use something like: > > /myapp/api/show_comment/id > > to show comment at id > > and > > /myapp/api/show_comment/ > > To show all comments > > > However, when I try this it complains ("invalid arguments"). I try to > > test id against None, but id is apparently a server object. > > Any ideas or do I just have to define all_comments? > >