Is there a way to construct relative urls using the request object?

I'm working within general purpose template functions, so I pretty
much can only rely on the request object, and I would like to create
urls in the form /foo/bar and not http://domain/foo/bar which is the
output of the request.resource_url() function.

Is there an option that I missed? I know that there is a
pyramid.traversal.resource_path() function, but AFAIK it doesn't let
you construct full urls with query string and anchors and stuff.

I guess I would filter the string after the fact and remove the
request.application_url component, but that seems hacky.

Any ideas?

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