fsi.models.course_event

Module Contents

Classes

CourseEvent

Mixin providing created/modified timestamps for all records.

Functions

course_status_choices(…)

Attributes

EventStatusType

COURSE_EVENT_STATUSES

COURSE_EVENT_STATUSES_TRANSLATIONS

fsi.models.course_event.EventStatusType: typing_extensions.TypeAlias[source]
fsi.models.course_event.COURSE_EVENT_STATUSES: tuple[EventStatusType, Ellipsis] = ('created', 'confirmed', 'canceled', 'planned')[source]
fsi.models.course_event.COURSE_EVENT_STATUSES_TRANSLATIONS = ()[source]
fsi.models.course_event.course_status_choices(request: FsiRequest | None = None, as_dict: Literal[False] = False) list[wtforms.fields.choices._Choice][source]
fsi.models.course_event.course_status_choices(request: FsiRequest | None, as_dict: Literal[True]) list[dict[str, str]]
fsi.models.course_event.course_status_choices(request: FsiRequest | None = None, *, as_dict: Literal[True]) list[dict[str, str]]
class fsi.models.course_event.CourseEvent[source]

Bases: onegov.core.orm.Base, onegov.core.orm.mixins.TimestampMixin, onegov.search.ORMSearchable

Mixin providing created/modified timestamps for all records.

The columns are deferred loaded as this is primarily for logging and future forensics.

property es_public: bool[source]

Returns True if the model is available to be found by the public. If false, only editors/admins will see this object in the search results.

property title: str[source]
property name: str[source]
property lead: str[source]
property description: str[source]
property description_html: str[source]

Returns the portrait that is saved as HTML from the redactor js plugin.

property duration: datetime.timedelta[source]
property hidden: bool[source]
property available_seats: int | None[source]
property booked: bool[source]
property bookable: bool[source]
property is_past: bool[source]
property locked: bool[source]
property duplicate_dict: dict[str, Any][source]
property duplicate: typing_extensions.Self[source]
property email_recipients: Iterator[str][source]
default_reminder_before[source]
__tablename__ = 'fsi_course_events'[source]
es_properties[source]
id: Column[uuid.UUID][source]
course_id: Column[uuid.UUID][source]
course: relationship[Course][source]
location: Column[str][source]
start: Column[datetime.datetime][source]
end: Column[datetime.datetime][source]
presenter_name: Column[str][source]
presenter_company: Column[str][source]
presenter_email: Column[str | None][source]
min_attendees: Column[int][source]
max_attendees: Column[int | None][source]
status: Column[EventStatusType][source]
attendees: relationship[AppenderQuery[CourseAttendee]][source]
subscriptions: relationship[AppenderQuery[CourseSubscription]][source]
subscriptions[source]
notification_templates: relationship[list[CourseNotificationTemplate]][source]
notification_templates[source]
info_template: relationship[InfoTemplate][source]
reservation_template: relationship[SubscriptionTemplate][source]
cancellation_template: relationship[CancellationTemplate][source]
reminder_template: relationship[ReminderTemplate][source]
hidden_from_public: Column[bool][source]
locked_for_subscriptions: Column[bool | None][source]
schedule_reminder_before: Column[datetime.timedelta][source]
__str__() str[source]

Return str(self).

localized_start() datetime.datetime[source]
localized_end() datetime.datetime[source]
scheduled_reminder() datetime.datetime[source]
next_event_start() datetime.datetime[source]
cached_reservation_count() int[source]
has_reservation(attendee_id: uuid.UUID) bool[source]
excluded_subscribers(year: int | None = None, as_uids: Literal[True] = True, exclude_inactive: bool = True) Query[tuple[uuid.UUID]][source]
excluded_subscribers(year: int | None, as_uids: Literal[False], exclude_inactive: bool = True) Query[CourseAttendee]
excluded_subscribers(year: int | None = None, *, as_uids: Literal[False], exclude_inactive: bool = True) Query[CourseAttendee]
excluded_subscribers(year: int | None, as_uids: bool, exclude_inactive: bool = True) Query[tuple[uuid.UUID]] | Query[CourseAttendee]

Returns a list of attendees / names tuple of UIDS of attendees that have booked one of the events of a course in the given year.

possible_subscribers(external_only: bool = False, year: int | None = None, as_uids: Literal[False] = False, exclude_inactive: bool = True, auth_attendee: onegov.fsi.models.course_attendee.CourseAttendee | None = None) Query[CourseAttendee][source]
possible_subscribers(external_only: bool, year: int | None, as_uids: Literal[True], exclude_inactive: bool = True, auth_attendee: onegov.fsi.models.course_attendee.CourseAttendee | None = None) Query[tuple[uuid.UUID]]
possible_subscribers(external_only: bool = False, year: int | None = None, *, as_uids: Literal[True], exclude_inactive: bool = True, auth_attendee: onegov.fsi.models.course_attendee.CourseAttendee | None = None) Query[tuple[uuid.UUID]]

Returns the list of possible bookers. Attendees that already have a subscription for the parent course in the same year are excluded.

as_ical(event_url: str | None = None) str[source]
as_ical_attachment(url: str | None = None) onegov.core.mail.Attachment[source]
can_book(attendee_or_id: CourseAttendee | uuid.UUID | str, year: int | None = None) bool[source]