On Wed, 2011-05-18 at 09:24 -0700, Landreville wrote: > I am using url dispatch with Pyramid (I came from Pylons). > Is there any way to generate a route path without the request? > I am using Formalchemy and need to have a link in a custom fieldset > (FieldSets are instantiated on startup as it is the best practice for > Formalchemy), but there is no request to pass to route_path. > > What is the best practice for generating URLs without the request? > Should I be using a string literal for the path?
Elements of the generated URL are taken *from* the request (e.g. the hostname), so, no, there is no way to use route_url without a request. You can create a request "by hand" using pyramid.request.Request.blank() if you need to. - C -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.