activity.models.period
¶
Module Contents¶
Classes¶
Mixin providing created/modified timestamps for all records. |
- class activity.models.period.Period[source]¶
Bases:
onegov.core.orm.Base
,onegov.core.orm.mixins.TimestampMixin
Mixin providing created/modified timestamps for all records.
The columns are deferred loaded as this is primarily for logging and future forensics.
- property booking_limit: int | None[source]¶
Returns the max_bookings_per_attendee limit if it applies.
- property is_prebooking_in_past: bool[source]¶
Returns true if current date is after start of booking phase or if current date is after prebooking end.
- activate() None [source]¶
Activates the current period, causing all occasions and activites to update their status and book-keeping.
It also makes sure no other period is active.
- deactivate() None [source]¶
Deactivates the current period, causing all occasions and activites to update their status and book-keeping.
- archive() None [source]¶
Moves all accepted activities with an occasion in this period into the archived state, unless there’s already another occasion in a period newer than the current period.