Haha, I can tell I'm really going to like web2py. No need to make the change though I definitely would take advantage of it if available. I'm was just curious if there was a reason.
In case others are wondering why I like to use dashes instead of underscores in URLs...embedded underscore in the url can appear hidden, or as a space, when the url is displayed as a link on a web page and the link is underlined. A dash does not have this problem. See the sample screenshot posted here for an example: http://is.gd/aSQg -KIRBY On Dec 9, 2008, at 2:34 PM, mdipierro wrote: > > There is no deep reason. It can be changed. You are the first to bring > this up. > > If no objections I will change it in the next version. > > Massimo > > > On Dec 9, 1:10 pm, Kirby Turner <[EMAIL PROTECTED]> wrote: >> Thanks Massimo. I understand re-mapping the url and I have the whole >> dash vs underscore thing worked out for my app. But I'm just >> wondering why controllers cannot have dashes in the name. Is it a >> python thing, a web2py thing? Just curious. I'm one of those >> curious >> people who like to understand why. >> >> Could someone briefly explain just to ease my curious mind? >> >> Thanks, >> -KIRBY >> >> On Dec 9, 2008, at 1:46 PM, mdipierro wrote: >> >> >> >>> Hi Kirby, >> >>> thanks for using web2py. >> >>> controller names cannot have dashes but you can create a web2py/ >>> routes.py and map '-' into '_' for each controller. >> >>> routes_in=[ >>> ('yourappname/controller-name/(?P<any>.*)','yourappname/ >>> controller_name/\g<any>'),, >>> ] >> >>> Massimo >> >>> On Dec 9, 12:40 pm, Kirby Turner <[EMAIL PROTECTED]> wrote: >>>> Hi All, >> >>>> I'm new to web2py (today is my second day using it) but I really >>>> like >>>> what I see. I have started migrating an ASP.NET site over to >>>> web2py >>>> and I'm amazed at how fast the migration is going. >> >>>> My original site uses dashes in some of its URLs. In migrating >>>> over I >>>> originally defined a controller and view with embedded dashes in >>>> the >>>> name, e.g., my-controller.py and my-controller.html. When I try >>>> viewing the web page through the web2py web server I get an >>>> "invalid >>>> request" error 400. >> >>>> Now, it's not a big deal to change the dashes to underscores and >>>> actually that is what I have already done. But I'm wondering why >>>> embedded dashes are not allowed. I started looking through the >>>> web2py >>>> but I haven't found the answer yet. >> >>>> Anyone have any insight as to why I cannot use dashes in the >>>> controller name? Just curious. >> >>>> Thanks, >>>> -KIRBY > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

