[Grok-dev] Re: late night revelation regarding grok.View

Philipp von Weitershausen philipp at weitershausen.de
Sun Sep 23 09:03:44 EDT 2007


Brandon Craig Rhodes wrote:
> I have found a much simpler solution to the problem with grok.View,
> zope.traversing.browser.absoluteurl.AbsoluteURL, and _getContextName.
> It will create a new version of Grok that works both with the old, and
> with the upcoming, versions of zope.traversing.
> 
> The solution, for those without the time to read further, is to add
> the following line to grok.View.__init__():
> 
>         self.__name__ = self.__view_name__

Great work! Thanks for figuring this out. I had an unfinished response 
to your original email about this problem where I basically was trying 
to figure out if there wasn't a much easier solution. Because I remember 
having thought about this problem, too, and thinking that either 
something in zope.traversing or in grok could be done much simpler.

I suppose your change in zope.traversing is fine now and can be merged 
to the 3.4 branch as well.


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


More information about the Grok-dev mailing list