[Zope3-dev] APIs breakage
Garrett Smith
garrett at mojave-corp.com
Tue Jul 13 10:58:16 EDT 2004
Stephan Richter wrote:
> On Monday 12 July 2004 12:01, Garrett Smith wrote:
>> I know this doesn't happen often, but it's fustrating when it does:
>>
>> Index:
>> C:/SCM/external/zope/Zope3/src/zope/app/traversing/namespace.py
>> ===================================================================
>> ...
>> -def getResourceInContext(ob, name, request):
>> ...
>> +def getResource(site, name, request):
>>
>> This public API change, IMO, needs to come with a post to the list
>> notifying us in no uncertain terms.
>
> I hope noone else is using these methods. I do *not* consider them
> public API.
That's interesting...what would you recommend for generating the correct
URL for a particular resource? This is how I'm using it (stub returns an
HTML fragment used in a view):
css = getResource(self.context, 'menu.css', self.request)
return '<link rel="stylesheet" type="text/css" href="%s" />' % css()
I stole this pattern from other views, which would seem to make it a
public API, maybe not though.
-- Garrett
More information about the Zope3-dev
mailing list