fsi.models.course_event
¶
Module Contents¶
Classes¶
Mixin providing created/modified timestamps for all records. |
Functions¶
Attributes¶
- fsi.models.course_event.COURSE_EVENT_STATUSES: tuple[EventStatusType, Ellipsis] = ('created', 'confirmed', 'canceled', 'planned')[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 description_html: str[source]¶
Returns the portrait that is saved as HTML from the redactor js plugin.
- attendees: relationship[AppenderQuery[CourseAttendee]][source]¶
- subscriptions: relationship[AppenderQuery[CourseSubscription]][source]¶
- notification_templates: relationship[list[CourseNotificationTemplate]][source]¶
- info_template: relationship[InfoTemplate][source]¶
- reservation_template: relationship[SubscriptionTemplate][source]¶
- cancellation_template: relationship[CancellationTemplate][source]¶
- reminder_template: relationship[ReminderTemplate][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.
- can_book(attendee_or_id: CourseAttendee | uuid.UUID | str, year: int | None = None) bool [source]¶