[Grok-dev] Re: viewlets and application_root
faassen at startifact.com
Thu Apr 24 17:20:12 EDT 2008
Robert Marianski wrote:
> I find myself walking up parents looking for application objects often.
> Is there a reason that this isn't a method on the grok.View class, or a
> function in grok.util?
I think there's a good use case for adding such functionality to both
grok itself (just like grok.url()) and to the view (and viewlet, I
guess). We already have application_url() which does much the same, but
then gets the URL right away. We should factor the walk-up-the-tree
Contributions would be welcome!
(As an alternative I often use grok.getSite(), but that will only work
for applications that have no sub-sites in it, so the tree walking would
be better here)
More information about the Grok-dev