On Fri, Jan 28, 2011 at 1:28 AM, Michael Merickel <[email protected]> wrote:
> I see a 'directory' parameter documented in add_static_route(), however the
> actual implementation doesn't seem to support it.
> The whole add_static_route() idea is a nice backward-compatible feature with
> pylons but I feel like it takes away from some of the features pyramid
> provides, like the static_url() function which can help map arbitrary urls
> to directories. The static_url() function unfortunately doesn't work with
> any regular routes, such as those created by add_static_route(), leaving the
> developer to use either the application_url (effectively hard-coding the
> structure) or through route_url() which isn't immediately obvious. Anyway I
> wanted to bring this up in case it can provoke some better documentation for
> the feature, or possibly not supporting it as the default setup for static
> content.

The point is to give people a choice, and to make the default the
backward-compatible way and the way that isn't available in the other
templates. The migration guide will compare all these approaches and
discuss the tradeoffs between them.

You're right that Pyramid URL generation gives more options that
Pylons didn't. But the tradeoff is that you have to generate the URL
in different ways depending on what it is. That can be seen as a
disadvantage, but there's no way around it.

I took 'directory' out. It was from an older implementation that didn't pan out.

-- 
Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to