On Mar 31, 2011, at 1:02 PM, VP wrote: > > I should have written "directory names" instead of "file names" (even > though they are related). > > The conflict is apparent when web2py and other things (Apache, etc.) > work together. For example, Apache routes the static files whereas > web2py routes the dynamic things. > > When you say URL('static', 'style.css'), web2py will assume that app- > names should be converted to hyphens. But its routing will interfere > with the conventional assumption of Apache, which is underscores are > meant to be underscores.
In that case, you'd either want to turn off hyphen translation or use the Apache rewrite function. BTW, I see that web2py's local_import function uses the application name as part of a module name. So app names must be legal Python module identifiers. > > > > On Mar 31, 2:52 pm, VP <vtp2...@gmail.com> wrote: >>> I guess I can see leaving the default to re-map hyphens to underscores but >>> perhaps only on functions? >> >> YES. >> >> App names are file names, and people generally don't want to have >> hyphens in their file names, which is the opposite of what they would >> want for URLs. >> >> As for app names, I think they should be left alone because the >> typical convention for file naming is underscored, which is the >> opposite of what is desired for URLs. In other words, if people name >> their files with underscores, it wouldn't be reasonable to assume they >> want hyphens.