[Zope] DTML-In with date/time filter

Martin Koekenberg martin at digital-adventures.nl
Wed May 3 08:47:06 EDT 2006


Hello Andreas,
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. 

Regards

Martin Koekenberg

 


-----Original Message-----
From: Andreas Jung <lists at zopyx.com>
To: Martin Koekenberg <martin at digital-adventures.nl>, zope at zope.org
Date: Wed, 03 May 2006 12:20:33 +0200
Subject: Re: [Zope] DTML-In with date/time filter




--On 3. Mai 2006 12:17:36 +0200 Martin Koekenberg 
<martin at digital-adventures.nl> wrote:

>
>  Hallo,
> I can create a dtml-in filte with the following code:
>
> return [doc for doc in context.objectValues('DTML Document')  if
> doc.getProperty('a')!='de']

Using "return" in DTML does not make sense. Writing such code in DTML
is bad-style. Use Pythonscript for this code and call the script from
DTML (btw. better user ZPT).


>
> How can I do the same with a date or time ?

What does that mean?

-aj


-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info at zopyx.com - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060503/df0d8a1b/attachment.htm


More information about the Zope mailing list