[Zope-dev] How to get Entrys from a catalog by date boundaries

Toby Dickenson tdickenson@geminidataloggers.com
Tue, 23 Jul 2002 10:42:22 +0100


On Tuesday 23 Jul 2002 10:20 am, Sebastian Sippl wrote:
> Hi,
>
> I've tried to select all entrys from a catalog by defining the date
> boundaries(Python script).
> Looks like this:
>
> id=3Dcontext.getId()
>
> return context.cata(
>          {'content' : id,
>           'date': [datestart, dateend],
>           'date_usage' : 'range:min:max',
>          }
>         )
> cata =3D my catalog,datestart =3Dstart date(date-string),dateend=3Dend =
date
>
> When I send my request, the only things I get back are some <MYBRAnI
> instance at #123848>-tags.
>
> For the beginning i would just like to get the ids of the items in the
> boundaries.

If you have id set up as catalog metadata, then those objects will each h=
ave=20
an id attribute which does what you want.