After looking through it and testing some scenarios. I think there are a few big problems with parse_as_rest():
1) it makes the code in the controller way too monolithic 2) it blurs the separation of routing and application level logic 3) it doesn't allow for granular access/authorization checks A shame really because it looked promising, but just didn't meet our requirements. On Monday, March 12, 2012 10:39:27 AM UTC-4, Anthony wrote: > > Check out the RESTful web services functionality: > http://web2py.com/books/default/chapter/29/10#Restful-Web-Services, in > particular, > http://web2py.com/books/default/chapter/29/10#parse_as_rest-(experimental) > . > > You could also handle this specific case in a controller action, with all > the elements of your URL in request.args: > > In default.py: > > def TopThing(): > rows = db((db.TopThing.id == db.MiddleThing.TopThing_id) & > (db.MiddleThing.id == db.BottomThing.MiddleThing_id) & > (db.TopThing.id == request.args(0)) & > (db.MiddleThing.id = request.args(2))).select() > return dict(rows=rows) > > Anthony > > On Monday, March 12, 2012 10:05:31 AM UTC-4, rdodev wrote: >> >> Hello all, >> >> I'm fairly knew to web2py and trying to find things out by myself as much >> as I can. However, I have not been able to find how to create >> logical/relationship URLs. Let's say I have a model named TopThing, which >> has a 1-to-many relationship with MiddleThing, which also has a one-to-many >> relationship with BottomThing. >> (TopThing->1:*->MiddleThing->1:*->BottomThing). So we'd like navigation to >> follow that same idea of >> (/AppName/TopThing/{_Id}/MiddleThing/{_Id}/BottomThing). Is it possible to >> have this in web2py? If so, would some one care to explain? Thx. >> >> >>