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
-~----------~----~----~----~------~----~------~--~---