[Zope3-dev] absolute_url vs IAbsoluteURL
Jim Fulton
jim at zope.com
Thu Apr 8 13:17:48 EDT 2004
Garrett Smith wrote:
> We're currently looking up the absolute URL view by name
> ('absolute_url'). Is this something falls into the 'magic names bad'
> category?
>
> I.e. instead of:
>
> zapi.getView(context, 'absolute_url', request)
>
> we'd use:
>
> zapi.getViewProviding(context, IAbsoluteURL, request)
We use both ways, because name lookup is much easier for paths
(e.g. tales)
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list