[Grok-dev] Re: Computing URLs relative to the application
optilude at gmx.net
Wed Apr 4 19:29:23 EDT 2007
Philipp von Weitershausen wrote:
> 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.
>> +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.
Sure. But there should be some common mechanism in Grok for this (the
common view base class is probably fine) so that each view doesn't need
to define it for itself!
More information about the Grok-dev