Q:

Mapping urls in routes.py

I am using web2py and builing a REST api and have one of my URLs set up like this:
routes_in (
    ('/myapp/something/{?P<id>.*)/myfunction', /myapp/default/myfunction/\g<id>')
)

routes_out = (
    ('/myapp/default/myfunction/\g<id>', '/myapp/something/{?P<id>.*)/myfunction')
)

If my app is setup this way my function is not even entered into and I get an invalid request if I remove the id argument from the url that my url is being mapped to i.e. remove g<id> from above, I enter my function but the argument is not being captured.
I cannot change the structure of the URL as per my requirements and I am not sure how to go about this.
I would appreciate any pointers.
Thanks,
nav

A:

The above does work in web2py I found that some other area of my code was breaking.

