You may also want to have a look at http://web2py.com/books/default/chapter/29/10#Restful-Web-Services and review the code examples in the trunk version in dal.py under function parse_as_rest, since this is still under development and the online book has not been updated.
Regards, Denes. On Tuesday, February 26, 2013 11:44:10 AM UTC-5, brac...@gmail.com wrote: > > Thanks, I must have missed that. > > Although I'm still a bit confused. The last framework I played with used > regex to determine the URL, so I could do something like: > > welcome/default/products/(\d{2}) # shows overall product page for > given product primary id > welcome/default/products/(\d{2})/description # shows product description > for given product primary id > welcome/default/products/(\d{2})/comments # shows product comments for > given product primary id > welcome/default/products/(\d{2})/comments/(\d{2}) # shows specific > comment for a specific product given comment id and product id > > and each one of those would map to some function which would return the > corresponding webpage. > > I noticed that the access control does almost exactly that: > > http://.../[app]/default/user/register > http://.../[app]/default/user/login > http://.../[app]/default/user/logout > http://.../[app]/default/user/profile > > > where everything falls under "/default/user/*" and I can define functions > in the controller to customize those pages (ie, "def register()" for > "/default/user/*"). > > I don't see this handled in routes.example.py or router.example.py, so > I'm confused how to handle this url dynamism. Especially in the case where > I have to handle multiple ids in a url (like in the comment id +product id > url). > > Could you please explain in a bit more detail? Thanks! > > On Monday, February 25, 2013 5:48:08 PM UTC-5, Anthony wrote: >> >> Everything after the function name in the URL can be found in >> request.args. > > -- --- 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/groups/opt_out.