fsi.models.course_event ======================= .. py:module:: fsi.models.course_event Attributes ---------- .. autoapisummary:: fsi.models.course_event.EventStatusType fsi.models.course_event.COURSE_EVENT_STATUSES fsi.models.course_event.COURSE_EVENT_STATUSES_TRANSLATIONS Classes ------- .. autoapisummary:: fsi.models.course_event.CourseEvent Functions --------- .. autoapisummary:: fsi.models.course_event.course_status_choices Module Contents --------------- .. py:type:: EventStatusType :canonical: Literal['created', 'confirmed', 'canceled', 'planned'] .. py:data:: COURSE_EVENT_STATUSES :type: tuple[EventStatusType, Ellipsis] :value: ('created', 'confirmed', 'canceled', 'planned') .. py:data:: COURSE_EVENT_STATUSES_TRANSLATIONS .. py:function:: course_status_choices(request: onegov.fsi.request.FsiRequest | None = None, as_dict: Literal[False] = False) -> list[wtforms.fields.choices._Choice] course_status_choices(request: onegov.fsi.request.FsiRequest | None, as_dict: Literal[True]) -> list[dict[str, str]] course_status_choices(request: onegov.fsi.request.FsiRequest | None = None, *, as_dict: Literal[True]) -> list[dict[str, str]] .. py:class:: CourseEvent Bases: :py:obj:`onegov.core.orm.Base`, :py:obj:`onegov.core.orm.mixins.TimestampMixin`, :py:obj:`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. .. py:attribute:: default_reminder_before .. py:attribute:: __tablename__ :value: 'fsi_course_events' .. py:attribute:: fts_properties .. py:attribute:: id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: course_id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: course :type: sqlalchemy.orm.relationship[fsi.models.course.Course] .. py:property:: fts_public :type: bool 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. .. py:property:: title :type: str .. py:property:: name :type: str .. py:property:: lead :type: str .. py:property:: description :type: markupsafe.Markup .. py:method:: __str__() -> str .. py:property:: localized_start :type: datetime.datetime .. py:property:: localized_end :type: datetime.datetime .. py:attribute:: location :type: sqlalchemy.Column[str] .. py:attribute:: start :type: sqlalchemy.Column[datetime.datetime] .. py:attribute:: end :type: sqlalchemy.Column[datetime.datetime] .. py:attribute:: presenter_name :type: sqlalchemy.Column[str] .. py:attribute:: presenter_company :type: sqlalchemy.Column[str] .. py:attribute:: presenter_email :type: sqlalchemy.Column[str | None] .. py:attribute:: min_attendees :type: sqlalchemy.Column[int] .. py:attribute:: max_attendees :type: sqlalchemy.Column[int | None] .. py:attribute:: status :type: sqlalchemy.Column[EventStatusType] .. py:attribute:: attendees :type: sqlalchemy.orm.relationship[onegov.core.types.AppenderQuery[onegov.fsi.models.course_attendee.CourseAttendee]] .. py:attribute:: subscriptions :type: sqlalchemy.orm.relationship[onegov.core.types.AppenderQuery[onegov.fsi.models.course_subscription.CourseSubscription]] .. py:attribute:: notification_templates :type: sqlalchemy.orm.relationship[list[fsi.models.course_notification_template.CourseNotificationTemplate]] .. py:attribute:: info_template :type: sqlalchemy.orm.relationship[fsi.models.course_notification_template.InfoTemplate] .. py:attribute:: reservation_template :type: sqlalchemy.orm.relationship[fsi.models.course_notification_template.SubscriptionTemplate] .. py:attribute:: cancellation_template :type: sqlalchemy.orm.relationship[fsi.models.course_notification_template.CancellationTemplate] .. py:attribute:: reminder_template :type: sqlalchemy.orm.relationship[fsi.models.course_notification_template.ReminderTemplate] .. py:attribute:: hidden_from_public :type: sqlalchemy.Column[bool] .. py:attribute:: locked_for_subscriptions :type: sqlalchemy.Column[bool | None] .. py:attribute:: schedule_reminder_before :type: sqlalchemy.Column[datetime.timedelta] .. py:property:: description_html :type: markupsafe.Markup Returns the portrait that is saved as HTML from the redactor js plugin. .. py:method:: scheduled_reminder() -> datetime.datetime .. py:method:: next_event_start() -> datetime.datetime .. py:property:: duration :type: datetime.timedelta .. py:property:: hidden :type: bool .. py:property:: cached_reservation_count :type: int .. py:property:: available_seats :type: int | None .. py:property:: booked :type: bool .. py:property:: bookable :type: bool .. py:property:: is_past :type: bool .. py:property:: locked :type: bool .. py:property:: duplicate_dict :type: dict[str, Any] .. py:property:: duplicate :type: Self .. py:method:: has_reservation(attendee_id: uuid.UUID) -> bool .. py:method:: excluded_subscribers(year: int | None = None, as_uids: Literal[True] = True, exclude_inactive: bool = True) -> sqlalchemy.orm.Query[tuple[uuid.UUID]] excluded_subscribers(year: int | None, as_uids: Literal[False], exclude_inactive: bool = True) -> sqlalchemy.orm.Query[onegov.fsi.models.course_attendee.CourseAttendee] excluded_subscribers(year: int | None = None, *, as_uids: Literal[False], exclude_inactive: bool = True) -> sqlalchemy.orm.Query[onegov.fsi.models.course_attendee.CourseAttendee] excluded_subscribers(year: int | None, as_uids: bool, exclude_inactive: bool = True) -> sqlalchemy.orm.Query[tuple[uuid.UUID]] | sqlalchemy.orm.Query[onegov.fsi.models.course_attendee.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. .. py:method:: 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) -> sqlalchemy.orm.Query[onegov.fsi.models.course_attendee.CourseAttendee] 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) -> sqlalchemy.orm.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) -> sqlalchemy.orm.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. .. py:property:: email_recipients :type: collections.abc.Iterator[str] .. py:method:: as_ical(event_url: str | None = None) -> bytes .. py:method:: as_ical_attachment(url: str | None = None) -> onegov.core.mail.Attachment .. py:method:: can_book(attendee_or_id: onegov.fsi.models.course_attendee.CourseAttendee | uuid.UUID | str, year: int | None = None) -> bool .. py:method:: exceeds_six_year_limit(attendee_id: str | onegov.core.orm.types.UUID, request: onegov.fsi.request.FsiRequest) -> bool