Canonical way of declaring a content type as Event-like

in Plone 5 we removed portal_calendar.

we were using that tool to list a content type as Event-like: if a content type was listed in calendar_types, it was an Event; see for instance, this code:

what would be the canonical way then? remember we have a problem with field naming in

1 Like

I ended up with this:

comments are welcome, any way.

1 Like

Here is an example how searches for event like objects:

Any object, which provides plone.event.interfaces.IEvent is an event-like objet.

For Dexterity, there is the, which is used by to mark Dexterity events as such.

The derives from that. Thus, any Dexterity object which uses the IEventBasic behavior is an event-like object. Adding this behavior to your content types is the easiest way to make an object eventish.

1 Like

that interface is just a marker with no methods/attributes described on it:

shouldn't be good to provide a description of what an Event should be?

IMO it is defined at minimum by start and end date.

1 Like

yes, start and end date should be the necessary minimum. That should probably be added to the Interface.

1 Like