[Zope-CMF] DynamicType's __before_publishing_traverse__
Dieter Maurer
dieter at handshake.de
Fri Mar 5 17:05:55 EST 2004
Chris McDonough wrote at 2004-3-4 21:22 -0500:
>Some time ago (maybe 8 months ago or so.. wow, I'm so out of the loop),
>Yuppie changed DynamicType to have a __before_publishing_traverse__
>method that munges the request's path to set the default view for the
>object.
>
>This code in PortalContent still exists, but I can't think of a case
>where it ever gets invoked:
>
> def __call__(self):
> '''
> Invokes the default view.
> '''
> view = _getViewFor(self)
> if getattr(aq_base(view), 'isDocTemp', 0):
> return view(self, self.REQUEST)
> else:
> return view()
>
> index_html = None # This special value informs ZPublisher to use
>__call__
"__call__" might also be called directly (rather than by ZPublisher).
I agree with Yuppie that a Depracation Warning would be better
than simply remove the code right away.
--
Dieter
More information about the Zope-CMF
mailing list