timApp.notification package
Contents
timApp.notification package#
Submodules#
timApp.notification.notification module#
timApp.notification.notify module#
- class timApp.notification.notify.NotificationSubject(subject_template: str, num_count_modifier: Callable[[int], str])[source]#
Bases:
object
- num_count_modifier: Callable[[int], str]#
- subject_template: str#
- timApp.notification.notify.get_diff_link(docentry: timApp.document.docinfo.DocInfo, ver_before: tuple[int, int], ver_after: tuple[int, int])[source]#
- timApp.notification.notify.get_message_for(ps: list[timApp.notification.pending_notification.PendingNotification], d: timApp.document.docinfo.DocInfo, show_text: bool, show_names: bool)[source]#
- timApp.notification.notify.get_name_string(users: list[timApp.user.user.User], show_names: bool)[source]#
- timApp.notification.notify.get_subject_for(ps: list[timApp.notification.pending_notification.PendingNotification], d: timApp.document.docinfo.DocInfo, show_names: bool) str [source]#
- timApp.notification.notify.get_type_of_notify(ps) timApp.notification.notification.NotificationType | str [source]#
- timApp.notification.notify.notify_doc_watchers(doc: timApp.document.docinfo.DocInfo, content_msg: str, notify_type: timApp.notification.notification.NotificationType, par: Optional[timApp.document.docparagraph.DocParagraph] = None, old_version: Optional[tuple[int, int]] = None, curr_user: Optional[timApp.user.user.User] = None, **kwargs)[source]#
timApp.notification.pending_notification module#
- class timApp.notification.pending_notification.AnswerNotification(**kwargs)[source]#
Bases:
timApp.notification.pending_notification.PendingNotification
A notification that an answer has been added, changed or deleted.
- answer_number#
- block#
- created#
- discriminant#
- doc_id#
- property grouping_key: tuple[int, str]#
- id#
- kind#
- par_id#
- processed#
- text#
- user: timApp.user.user.User#
- user_id#
- class timApp.notification.pending_notification.CommentNotification(**kwargs)[source]#
Bases:
timApp.notification.pending_notification.PendingNotification
A notification that a comment has been added, changed or deleted.
- block#
- created#
- discriminant#
- doc_id#
- property grouping_key: tuple[int, str]#
- id#
- kind#
- par_id#
- processed#
- text#
- user: timApp.user.user.User#
- user_id#
- class timApp.notification.pending_notification.DocumentNotification(**kwargs)[source]#
Bases:
timApp.notification.pending_notification.PendingNotification
A notification that a document has changed.
- block#
- created#
- discriminant#
- doc_id#
- property grouping_key: tuple[int, str]#
- id#
- kind#
- par_id#
- processed#
- text#
- user: timApp.user.user.User#
- user_id#
- property version_after: tuple[int, int]#
- property version_before: tuple[int, int]#
- version_change: str#
- class timApp.notification.pending_notification.PendingNotification(**kwargs)[source]#
Bases:
sqlalchemy.ext.declarative.api.Model
- block#
- created#
- discriminant#
- doc_id#
- property grouping_key: tuple[int, str]#
- id#
- kind#
- property notify_type: timApp.notification.notification.NotificationType#
- par_id#
- processed#
- text#
- user: timApp.user.user.User#
- user_id#
- timApp.notification.pending_notification.get_pending_notifications() list[timApp.notification.pending_notification.PendingNotification] [source]#
timApp.notification.send_email module#
- timApp.notification.send_email.multi_send_email(rcpt: str, subject: str, msg: str, mail_from: str = 'tim@jyu.fi', reply_to: str = 'no-reply@tim.jyu.fi', bcc: str = '', reply_all: bool = False) None [source]#
- timApp.notification.send_email.multi_send_email_impl(flask_app: flask.app.Flask, rcpt: str, subject: str, msg: str, mail_from: str = 'tim@jyu.fi', reply_to: str = 'no-reply@tim.jyu.fi', bcc: str = '', reply_all: bool = False) None [source]#