On Tue, 2010-07-13 at 03:27 -0700, Mikko Ohtamaa wrote:
>
> Mikko Ohtamaa wrote:
> >
> > So the question is.. how to write a query which renders recurrent events
> > in a calendar view?
> >
>
> Any pointers... I would hate to be the first person on earth trying this :(
hi mikko,
maybe these are some pointers...
dateable.kalends defines the API for events (there is just an
__init__.py which defines the interfaces), especially for recurring
events based on recurrence rules from the dateutil.rrule [1] (which is
extremely powerful). dateable.chronos defines calendar views with
recurrence support. both packages do not implement recurring events -
this has to be done by other packages, like vs.event.
in vs.event you can see how recurrence support is provided by an adapter
for events:
adapter configuration: vs.event.content.configure.zcml
adapter factory: vs.event.content.recurrence.VSRecurrenceSupport
especially the method getOcurrenceDays and getRecurrenceRule are
important.
here you can see, how occurences of an event can be fetched:
vs.event.browser.vs_event_view.VSEventView.nextDates
as tom said, there is the plone.app.event package which purpose is to
provide content types, views and utilities for calendarish events in one
place - peeled out from Products.ATContentTypes. work has started at the
cathedral sprint in march 2010 and it's far from finished yet. but some
words on this package:
- at the current state it won't use dateable.chronos and
dateable.kalends
- but it uses dateutil.rrule for recurrence support
- it uses Products.DateRecurringIndex for indexing the ocurrences of an
recurring event. Products.DateRecurringIndex [2] is rewritten to support
dateutil.rrule. i've done some API changes recently which aren't
commited yet, so don't rely on what you see there.
- help welcomed. i think a sprint with a dedicated team working on
plone.app.event will be necessary.
best,
hannes
[1]
http://labix.org/python-dateutil#head-470fa22b2db72000d7abe698a5783a46b0731b57
[2]
https://svn.plone.org/svn/collective/Products.DateRecurringIndex/branches/DateRecurringIndex2-dateutils/
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers