It is optional; read the router.py docs.
Jonathan mentioned that in his post.
On 3/31/11 12:24 PM, VP wrote:
Unless I misunderstand the issue at hand here, seriously, I do not
think this is web2py's scope to do this automatic mapping hyphens or
dashes to underscores.
Hyphen/dash is a minus sign. You can't define a Python variable or
function that has a hyphen/dash. It's syntactically incorrect. I do
not think it's web2py's place to automatically fix this syntactical
error. (For one thing, it seems the side effect of this is that
underscores are automatically converted to hyphens, which is clearly
undesirable).
Perhaps, the best thing is letting people turn on this mapping
optionally.
On Mar 31, 9:31 am, Ross Peoples<ross.peop...@gmail.com> wrote:
web2py will automatically convert dashes to underscores for the function
names, so:
getting-started
will become:
def getting_started():
return dict()