fsi.models.course_event

Attributes

EventStatusType

COURSE_EVENT_STATUSES

COURSE_EVENT_STATUSES_TRANSLATIONS

Classes

CourseEvent

Mixin providing created/modified timestamps for all records.

Functions

course_status_choices(…)

Module Contents

fsi.models.course_event.EventStatusType: TypeAlias = Literal['created', 'confirmed', 'canceled', 'planned'][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.

default_reminder_before[source]
__tablename__ = 'fsi_course_events'[source]
es_properties[source]

Returns the type mapping of this model. Each property in the mapping will be read from the model instance.

The returned object needs to be a dict or an object that provides a to_dict method.

Internally, onegov.search stores differing languages in different indices. It does this automatically through langauge detection, or by manually specifying a language.

Note that objects with multiple languages are not supported (each object is supposed to have exactly one language).

Onegov.search will automatically insert the right analyzer for types like these.

There’s currently only limited support for properties here, namely objects and nested mappings do not work! This is going to be added in the future though.

id: Column[uuid.UUID][source]
course_id: Column[uuid.UUID][source]
course: relationship[Course][source]
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: markupsafe.Markup[source]
__str__() str[source]
property localized_start: datetime.datetime[source]
property localized_end: datetime.datetime[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]
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]
hidden_from_public: Column[bool][source]
locked_for_subscriptions: Column[bool | None][source]
schedule_reminder_before: Column[datetime.timedelta][source]
property description_html: markupsafe.Markup[source]

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

scheduled_reminder() datetime.datetime[source]
next_event_start() datetime.datetime[source]
property duration: datetime.timedelta[source]
property hidden: bool[source]
property cached_reservation_count: int[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: Self[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.

property email_recipients: Iterator[str][source]
as_ical(event_url: str | None = None) bytes[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]