[Zope3-dev] absolute_url vs IAbsoluteURL
Garrett Smith
garrett at mojave-corp.com
Thu Apr 8 13:35:31 EDT 2004
The views are not currently registered as providing IAbsoluteURL -- I'll
add that, presuming it's desirable.
-----Original Message-----
From: Jim Fulton
Sent: Thu 4/8/2004 12:17 PM
To: Garrett Smith
Cc: zope3-dev at zope.org
Subject: Re: [Zope3-dev] absolute_url vs IAbsoluteURL
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 2765 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20040408/8e73ae81/attachment.bin
More information about the Zope3-dev
mailing list