Janeway (an open source publishing platform written in Python and using the Django framework) uses an event system that allows apps and plugins to register to be called when an event is fired. An example of this would be when a new submission is made.


This event is called whenever a new article is submitted, any app or plugin can register to have a function called when this event is triggered by the following method:

from events import logic as event_logicevent_logic.Events.register_for_event(event_logic.Events.ON_ARTICLE_SUBMITTED, plugins.my_submission_plugin.events.a_function)

The above is obviously an example, but you get the picture. By default an Event passes a set of keyword arguments for your function to use and these are documented inside events.logic.Events

Janeway uses the Event framework to handle raising of emails and entering Logs during its workflow process.

All of the credit (and blame if you hate it) for the Events framework goes to Martin P Eve. More information on Janeway can be found on its website or github.

Pub Tech developer for Birkbeck CTP

Pub Tech developer for Birkbeck CTP