OK, I think you make a good point. Leaving the current default behavior 
(i.e., automatic translation between underscores and hyphens) can actually 
cause things to break, whereas turning off the translation by default will 
merely result in ugly URLs (but nothing will break). That's probably a good 
argument for changing the default behavior.
 
Still, it would be nice if there were an easy way to handle your situation 
with Apache serving static files (e.g., by specifying an translation 
exclusion for URLs involving the static "controller").
 
Anthony

On Thursday, March 31, 2011 6:33:02 PM UTC-4, VP wrote:

>
> > The router assumes if you name your app with underscores that you *do* 
> want 
> > hyphens when the app name is displayed in a URL, and that does seem 
> > reasonable. 
> > 
> > Best, 
> > Anthony 
>
> The problem is when I name my app with underscore but do not want 
> hyphens in the URL.  As mentioned above, an example is when I use 
> Apache to serve static files.  In such a scenario, I do want 
> URL('static', 'file.txt') to be 'my_app/static/file.txt' NOT 'my-app/ 
> static/file.txt'.  This is because Apache has no idea what 'my-app/ 
> static/file.txt' is. 
>
> As Johnathan said, I can use mod-rewrite in Apache to rewrite, but it 
> doesn't make sense to require people do this by default. 
>
> I think the pretty URL display setting should be optional instead of 
> default.  Generally speaking, I think behaviors that are different 
> from conventionally expected should be default behaviors.  Pretty URLs 
> are desirable, but underscored filenames are conventional. 
>
> (desirable means nobody gets hurts if it's not done as such; 
> conventional means certainly will go bad if not done as such). 
>
>

Reply via email to