[Grok-dev] Re: Computing URLs relative to the application

Philipp von Weitershausen philipp at weitershausen.de
Wed Apr 4 19:15:02 EDT 2007

Martin Aspeli wrote:
> Philipp von Weitershausen wrote:
>> Hey there,
>> I find it a very common requirement to compute URLs relative to the 
>> grok.Application object. I'm inclined to introduce an 
>> application_url() method on grok.View.
>> Thoughts?
> +1, this is very common in Plone as well where we have a $portal_url 
> globally in the template namespace.

Yes. Of course, that global stuff is evil (I just hope it'll go away in 
Plone). The natural namespace for such optimizations/shortcuts is the 
'view' object.

http://worldcookery.com -- Professional Zope documentation and training

More information about the Grok-dev mailing list