On Thursday, March 31, 2011 12:18:14 PM UTC-4, VP wrote: > > I am curious. I don't think people can define Python functions > (controllers) that have hyphens. Right? If their controllers can not > have hyphens, then why would web2py have to worry about mapping > hyphens to underscores in function names(which appears to have > undesirable side effects)?
I think the idea is that hyphens are preferrable to underscores in URLs, yet you cannot use hyphens in function names. So, with the automatic conversion, if you have a function named 'my_long_function', you get a URL with 'my-long-function'. So, hyphens in incoming URLs get mapped to underscores, and underscores get mapped to hyphens in outgoing URLs. If you use only underscores (as opposed to hyphens) in all your application, controller, and function names and leave the default router settings in place, everything should work fine. It sounds like you have an app name that includes a hyphen, though, so that causes problems with the default setting. I guess you could either change the default setting, or change the hyphen in your app name to an underscore. Anthony

