3 May
2006
3 May
'06
7:28 p.m.
Martin Koekenberg wrote at 2006-5-3 14:47 +0200:
I use this code in a Python script and call this script within a DTML-IN statement. What I need is a script to get only items with a date in the future, today or in the past. The objects are DTML Documents with a date property field.
Assuming, your property contains a date, you can uses something like (to get things with dates in the future): now = container.ZopeTime() # see the "DateTime" documentation for other times return [obj for obj in context.objectValues() if obj.getProperty(...) > now ] -- Dieter