[Zope3-Users] Re: Utility Local to an Annotation?

Derek Richardson derek.richardson at gatech.edu
Thu Apr 26 22:55:53 EDT 2007


Benji York wrote:
> Derek Richardson wrote:
>> The specific case is uuids for atom feed entries. We have annotations 
>> representing feeds and I would like my uuid utility to be local to the 
>> feed annotation, thus recording and making available uuids only for 
>> entries in that feed.
> 
> How about a multi-adapter from content and feed to UUID?

Hmmm, to do that I have to be able to annotate an annotation, right? As 
the feed is an annotation and that is where I want to store the UUIDs. I 
tried this tonight and was unable to make it work - I got the following:

blah, blah, blah
   File 
"/Users/dkr/Zope-3.3.1/build/lib.darwin-8.8.1-i386-2.4/zope/security/adapter.py", 
line 84, in __call__
     adapter = self.factory(*args)
   File 
"/Users/dkr/Zope-3.3.1/build/lib.darwin-8.8.1-i386-2.4/zope/annotation/factory.py", 
line 38, in getAnnotation
     annotations = IAnnotations(context)
TypeError: ('Could not adapt', 
<plone.syndication.syndication.Syndication object at 0x3741530>, 
<InterfaceClass zope.annotation.interfaces.IAnnotations>)

Did you have something else in mind? Or is annotating an annotation 
possible and something is wrong in my implementation?

Thanks,

Derek



More information about the Zope3-users mailing list