[Zope] Caledar Tag
Jason Spisak
jason@mtear.com
Mon, 13 Sep 1999 08:10:05 GMT
Martijin,
I was having a lot of trouble comparing dates in the Catalog call.
So I used this way.
I also wrote this code with 0.1.0 of ZCatalog.
I'd love to be able to ask the Catalog for just a months worth of data and
then iterate through it for each month displayed. But it didn't work.
Probably does now though.
All my best,
Jason Spisak
> So you ask the Catalog for all items for a given user and then loop through
> all these items for every day displayed by the calender?
>
> Why not, depending on what would be speediest:
>
> 1. Call the Catalog for every day displayed and ask the it for items on
> that day.
> or
> 2. Call the Catalog once the first time the code in the calender tag is
> rendered (test for day one?), ask for the data for the current month, and
> store it in a REQUEST variable. Then loop through this limited set.
>
> In the last case, you could even make a temporary dictionary keyed on day
> of the month. This is quite simple.
>
> You should try and find a balance between number of loops and number of
> calls to the Catalog.
>
> --
> Martijn Pieters, Web Developer
> | Antraciet http://www.antraciet.nl
> | T: +31 35 7502100 F: +31 35 7502111
> | mj@antraciet.nl http://www.antraciet.nl/~mj
> | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
> ---------------------------------------------
>