[web2py] Re: routing maps underscore to hyphens

2011-03-31 Thread Anthony
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 fun

Re: [web2py] Re: routing maps underscore to hyphens

2011-03-31 Thread David J.
That is correct; you can not use a hyphen in a python function name. On 3/31/11 12:18 PM, 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 mapp

[web2py] Re: routing maps underscore to hyphens

2011-03-31 Thread VP
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)? On Mar 3

Re: [web2py] Re: routing maps underscore to hyphens

2011-03-31 Thread Jonathan Lundell
On Mar 30, 2011, at 11:35 PM, pbreit wrote: > Perhaps at least it can be fixed to accept hyphens in the app name? The only > problem is with function names, correct? I'm pretty sure that controller names are a problem, too, and I'm not certain about application names. Function names are the mo

[web2py] Re: routing maps underscore to hyphens

2011-03-30 Thread pbreit
Perhaps at least it can be fixed to accept hyphens in the app name? The only problem is with function names, correct?

[web2py] Re: routing maps underscore to hyphens

2011-03-30 Thread VP
Thanks. On Mar 30, 11:52 pm, Jonathan Lundell wrote: > On Mar 30, 2011, at 9:15 PM, VP wrote: > > > > > Thanks. > > > Is there a way to turn this off globally for all apps?  Or do I have > > to turn it off for each app by specifying hyphen_map=False for each > > app dictionary? > > Just put hyphe

Re: [web2py] Re: routing maps underscore to hyphens

2011-03-30 Thread Jonathan Lundell
On Mar 30, 2011, at 9:15 PM, VP wrote: > > Thanks. > > Is there a way to turn this off globally for all apps? Or do I have > to turn it off for each app by specifying hyphen_map=False for each > app dictionary? Just put hyphen_map=False in the BASE dictionary, and it'll set the default for all

[web2py] Re: routing maps underscore to hyphens

2011-03-30 Thread VP
I'm not either. Many apps often have underscores, and if I use router as routes.py, the default behavior breaks it. On Mar 30, 11:37 pm, pbreit wrote: > I'm still not sure I'm comfortable with this as default functionality but > maybe that's my bias on URLs being sacred!I'

Re: [web2py] Re: routing maps underscore to hyphens

2011-03-30 Thread pbreit
I'm still not sure I'm comfortable with this as default functionality but maybe that's my bias on URLs being sacred!

[web2py] Re: routing maps underscore to hyphens

2011-03-30 Thread VP
Thanks. Is there a way to turn this off globally for all apps? Or do I have to turn it off for each app by specifying hyphen_map=False for each app dictionary? Thanks. On Mar 30, 9:35 pm, Jonathan Lundell wrote: > On Mar 30, 2011, at 7:25 PM, VP wrote: > > > > > I actually found the opposite o

Re: [web2py] Re: routing maps underscore to hyphens

2011-03-30 Thread Jonathan Lundell
On Mar 30, 2011, at 7:25 PM, VP wrote: > > I actually found the opposite of this. Namely, it maps underscores to > hyphens, as I described above. Note that, my app's name has > underscores; but my controllers have none. At any rate, you can turn the mapping off. The mapping is between hyphens

[web2py] Re: routing maps underscore to hyphens

2011-03-30 Thread VP
I actually found the opposite of this. Namely, it maps underscores to hyphens, as I described above. Note that, my app's name has underscores; but my controllers have none. On Mar 30, 6:08 pm, Jonathan Lundell wrote: > On Mar 30, 2011, at 3:59 PM, VP wrote: > > > > > I think this is whatt he n

[web2py] Re: routing maps underscore to hyphens

2011-03-30 Thread VP
Specifically, i used to have URL('static', 'base.css') which translated to /my-app-name/static/base.css, which is of course an incorrect path (as far as Apache is concerned). On Mar 30, 5:59 pm, VP wrote: > I think this is whatt he new routing mechanism does.  Is this right? > Is there a technic