election_day.collections.notifications
Classes
Module Contents
- class election_day.collections.notifications.NotificationCollection(session: sqlalchemy.orm.Session)[source]
-
- query() Query[Notification] [source]
- by_model(model: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.Vote, current: bool = True) list[onegov.election_day.models.Notification] [source]
Returns the notification for the given election or vote and its modification times. Only returns the current by default.
- trigger(request: onegov.election_day.request.ElectionDayRequest, model: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.Vote, options: Collection[str]) None [source]
Triggers and adds the selected notifications.
- trigger_summarized(request: onegov.election_day.request.ElectionDayRequest, elections: Sequence[Election], election_compounds: Sequence[ElectionCompound], votes: Sequence[Vote], options: Collection[str]) None [source]
Triggers and adds a single notification for all given votes and elections.