fsi.models.course_notification_template

Attributes

NotificationType

NOTIFICATION_TYPES

NOTIFICATION_TYPE_TRANSLATIONS

GERMAN_TYPE_TRANSLATIONS

Classes

CourseInvitationTemplate

This is kind of a dummy db model for using as the template for

CourseNotificationTemplate

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded

InfoTemplate

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded

SubscriptionTemplate

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded

ReminderTemplate

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded

CancellationTemplate

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded

Functions

template_type_choices(→ tuple[tuple[str, str], Ellipsis])

get_template_default(→ str)

template_name(→ str)

Module Contents

fsi.models.course_notification_template.NotificationType: TypeAlias = Literal['info', 'reservation', 'reminder', 'cancellation'][source]
fsi.models.course_notification_template.NOTIFICATION_TYPES: tuple[NotificationType, Ellipsis] = ('info', 'reservation', 'reminder', 'cancellation')[source]
fsi.models.course_notification_template.NOTIFICATION_TYPE_TRANSLATIONS[source]
fsi.models.course_notification_template.GERMAN_TYPE_TRANSLATIONS[source]
fsi.models.course_notification_template.template_type_choices(request: FsiRequest | None = None) tuple[tuple[str, str], Ellipsis][source]
fsi.models.course_notification_template.get_template_default(context: Any, type: str | None = None) str[source]
fsi.models.course_notification_template.template_name(type: NotificationType | Literal['invitation'], request: FsiRequest | None = None) str[source]
class fsi.models.course_notification_template.CourseInvitationTemplate[source]

This is kind of a dummy db model for using as the template for CourseInviteMailLayout. If needed, this can be replaced with a real model without changing too much code.

text = None[source]
text_html = None[source]
type: Literal['invitation'] = 'invitation'[source]
subject[source]
class fsi.models.course_notification_template.CourseNotificationTemplate[source]

Bases: onegov.core.orm.Base, onegov.core.orm.mixins.ContentMixin, onegov.core.orm.mixins.TimestampMixin

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view).

__tablename__ = 'fsi_notification_templates'[source]
__table_args__[source]
type: Column[NotificationType][source]
__mapper_args__[source]
course_event_id: Column[uuid.UUID][source]
course_event: relationship[CourseEvent][source]
id: Column[uuid.UUID][source]
subject: Column[str | None][source]
text: Column[str | None][source]
last_sent: Column[datetime | None][source]
duplicate() Self[source]
property text_html: markupsafe.Markup | None[source]
class fsi.models.course_notification_template.InfoTemplate[source]

Bases: CourseNotificationTemplate

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view).

__mapper_args__[source]
class fsi.models.course_notification_template.SubscriptionTemplate[source]

Bases: CourseNotificationTemplate

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view).

__mapper_args__[source]
class fsi.models.course_notification_template.ReminderTemplate[source]

Bases: CourseNotificationTemplate

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view).

__mapper_args__[source]
class fsi.models.course_notification_template.CancellationTemplate[source]

Bases: CourseNotificationTemplate

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view).

__mapper_args__[source]