[Zope-CMF] Re: PROPOSAL: implement synContentValues in CMFTopic

Michael Haubenwallner michael at d2m.at
Tue Jun 8 00:57:42 EDT 2004


Petri Savolainen wrote:
> On Mon, 07 Jun 2004 20:01:46 +0200, Michael Haubenwallner wrote:
> 
> 
>>>So, we should probably do something like:
>>>
>>>    def synContentValues( self ):
>>>
>>>        """ See Syndicatable.
>>>        """
>>>        syn_tool = getToolByName( self, 'portal_syndication' )
>>>        limit = syn_tool.getMaxItems( self )
>>>        brains = self.queryCatalog( sort_limit=limit )[ :limit ]
>>>        return [ brain.getObject() for brain in brains ]
>>>
>>>Please submit your feature request at the CMF collector:
>>>
>>>  http://zope.org/Collectors/CMF
>>>
>>>Tres.
>>
>>this has already happend in november last year
>>http://zope.org/Collectors/CMF/203
>>
>>i am fine with just returning the brains though (you can get the objects 
>>at display time).
> 
> 
> Normal syndication (of folder content) seems to return actual objects
> (see contentValues() of PortalFolder.py). Does this mean we could improve
> zope syndication efficiency overall by returning just brains? Or
> should we rather just return objects and use caching? Since RSS feeds
> specify an update frequency, I guess they would be a good candidate for
> caching...?
> 
> I tried to make some quick & dirty tests with a Topic that looked for some
> News Items, but the stock RSS generation template in CMF 1.4.4 appears to
> generate invalid RSS when just brains are returned. Furthemore, on Plone2,
> same test resulted in Type Error. Plone has its own RSS generation
> template(s) if I remember correctly.
> 
> Returning the actual objects works fine in both cases.
> 
>  Petri
> 

You are both right and i am fine with what Tres now came up in the 
collector entry.

-- 
michael




More information about the Zope-CMF mailing list