On 01/03/2011 16:59, Jean-Philippe wrote:
First off, I believe your views need to be named for this to work.

But views don't need to have names ;-)

That being said, the following would work from within a view callable:

url  = request.route_path('history')

...not if I'm not using a route...

route_path is similar to route_url but generates a path (aka a
‘relative URL’, a URL minus the host, scheme, and port)

_path generation is for the brave, you should stick to the _url methods unless you're really certain you should be heading to _path.

I ended up just adding the following on my view class:

    def url_for(self,name):
        return self.request.application_url+'/'+name

I'm fairly sure there's a ui equivalent for this...

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
           - http://www.simplistix.co.uk

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

Reply via email to