[Zope-CMF] Querying Catalog for Today's events

Dieter Maurer dieter@handshake.de
Mon, 4 Feb 2002 23:35:38 +0100


Jon Edwards writes:
 > I'm trying to use CMFCalendar/Events to give a list of Today's events for an
 > organisation or person.
 > 
 > So I hacked Event.py so that 'edit' sets
 > 
 >      self.effective_date = self.start_date
 >      self.expiration_date = self.end_date
 > ....
 >  <tbody tal:define="news python: here.portal_catalog(meta_type='CMF Event',
 > sort_on='expires', sort_order='reverse', review_state='published',
 >          effective={'query':'ZopeTime()', 'range':'max'},
 > expires={'query':'ZopeTime()', 'range':'min'});
 >          Batch python:modules['ZTUtils'].Batch;
 > 		 global batch python:Batch(news, 10, 0, orphan=1)">
 > 
 > No matter what dates/times I set for events, they don't show up in the list!
You may need "earliestTime" and "latestTime" at some place...


Dieter