<HTML>
<HEAD> <META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE title="table borders">.htmtableborders, .htmtableborders td,
.htmtableborders th {border : 1px dashed lightgrey ! important;} </STYLE>
<STYLE type=text/css>html, body { border: 0px; } span.macro, span.macro ul,
span.macro div, span.macro p {background : #CCCCCC;} </STYLE> <STYLE
type=text/css> p{margin-bottom: 0.15em;margin-top:
0.15em;}body{font-family:tahoma;font-size:10pt;}; </STYLE> </HEAD> <BODY>
<FONT style="FONT-SIZE: 10pt; FONT-FAMILY: tahoma"> <DIV>
Hello Andreas,</DIV> <DIV>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. </DIV> <DIV> </DIV> <DIV>
Regards</DIV> <DIV> </DIV> <DIV>Martin Koekenberg</DIV> <DIV>
</DIV> <DIV> </DIV></FONT><BR> <BLOCKQUOTE style="PADDING-RIGHT:
0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid;
MARGIN-RIGHT: 0px">-----Original Message-----<BR>From: Andreas Jung
<lists@zopyx.com><BR>To: Martin Koekenberg
<martin@digital-adventures.nl>, zope@zope.org<BR>Date: Wed, 03 May
2006 12:20:33 +0200<BR>Subject: Re: [Zope] DTML-In with date/time filter<BR>
<BR> <DIV style="FONT-FAMILY: monospace, courier new, courier"><BR><BR>--On
3. Mai 2006 12:17:36 +0200 Martin Koekenberg <BR>
<martin@digital-adventures.nl> wrote:<BR><BR>><BR>>
Hallo,<BR>> I can create a dtml-in filte with the following
code:<BR>><BR>> return [doc for doc in context.objectValues('DTML
Document') if<BR>> doc.getProperty('a')!='de']<BR><BR>Using
"return" in DTML does not make sense. Writing such code in DTML<BR>is
bad-style. Use Pythonscript for this code and call the script from<BR>DTML
(btw. better user ZPT).<BR><BR><BR>><BR>> How can I do the same with a
date or time ?<BR><BR>What does that mean?<BR><BR>-aj<BR><BR><BR>-- <BR>
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany<BR>
Web: <A target=_blank href="http://www.zopyx.com">www.zopyx.com</A> - Email:
info@zopyx.com - Phone +49 - 7071 - 793376<BR>E-Publishing, Python, Zope
& Plone development, Consulting<BR></DIV></BLOCKQUOTE></BODY>
</HTML>