[Zope] PCNG 1.2.3 and cataloge query question

Bryan Simmons bryan.simmons at gmail.com
Wed Aug 25 11:22:34 EDT 2004


Hey,

This isn't a bug or feature request, so I'm keeping it out of the
collective tracker.
I'm writing custom reports for an instance of PloneCollectorNG 1.2.3. 
I am stuck at a
point, however.  I want to show all issues created between two dates. 
So far, this is the
query I have:

<li tal:repeat="row python: here.pcng_catalog(created={'query' : [
date1 , date2 ], 'range' : 'minmax' }, sort_on='getId')">

date1 and date2 are defined as such in a tal:define="date1 python:
context.String2DateTime('7/1/04');"

For some reason this query returns nothing, though I know the data
range is correct.  I think that perhaps the format or datatype of the
date1/date2 vars is wrong.
I took a long look at Andreas' code for his date search and his is
done as a subtraction of DateTime() - int(d_value) which suggests that
the data value passed to a query must be in integer form.  But I tried
this via:  date1 python: int('7/1/04')
Python did not like that at all.

Can anyone hint at an answer?
-- 

Regards,

Bryan Simmons
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Always code as if the guy who ends up maintaining your code will 
 be a violent psychopath who knows where you live.
   -- Rick Osborne
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


More information about the Zope mailing list