本文整理汇总了Python中MaKaC.webinterface.mail.GenericNotification.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python GenericNotification.__init__方法的具体用法?Python GenericNotification.__init__怎么用?Python GenericNotification.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MaKaC.webinterface.mail.GenericNotification
的用法示例。
在下文中一共展示了GenericNotification.__init__方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, psList):
self._psList = psList
self._participationsByConf = self._calculateParticipationsByConf()
self._forceIndicoFromAddress = len(self._participationsByConf) > 1
data = {}
data["subject"] = "[Indico] User account creation required"
data["toList"] = [self._psList[0].getEmail()]
GenericNotification.__init__(self, data)
示例2: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, booking):
GenericNotification.__init__(self)
self._booking = booking
self._bp = booking._bookingParams
self._conference = booking.getConference()
self._modifLink = str(booking.getModificationURL())
self.setFromAddr("Indico Mailer<%s>"%HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail())
self.setContentType("text/html")
示例3: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, booking):
GenericNotification.__init__(self)
self._booking = booking
self._bp = booking.getBookingParams()
self._conference = booking.getConference()
self._isLecture = self._conference.getType() == 'simple_event'
self._modifLink = str(booking.getModificationURL())
self.setFromAddr("Indico Mailer<%s>"%Config.getInstance().getSupportEmail())
self.setContentType("text/html")
示例4: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, booking):
GenericNotification.__init__(self)
self._booking = booking
self._bp = booking._bookingParams
self._conference = booking.getConference()
self._modifLink = str(self._booking.getModificationURL())
self.setFromAddr("Indico Mailer <%s>"%Config.getInstance().getSupportEmail())
self.setToList(MailTools.getAdminEmailList())
self.setContentType("text/html")
示例5: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, user, judgement, contribution):
GenericNotification.__init__(self)
self.setFromAddr("Indico Mailer<%s>"%HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail())
self.setToList([user.getEmail()])
if isinstance(judgement, EditorJudgement):
self.setSubject("""[Indico] The layout of your contribution "%s" (id: %s) has been reviewed"""
% (contribution.getTitle(), str(contribution.getId())))
self.setBody("""Dear Indico user,
The layout of your contribution "%s" (id: %s) has been reviewed.
The judgement was: %s
The comments of the editor were:
"%s"
Thank you for using our system.
""" % ( contribution.getTitle(), str(contribution.getId()), judgement.getJudgement(),
judgement.getComments())
)
elif isinstance(judgement, ReviewerJudgement):
self.setSubject("""[Indico] The content of your contribution "%s" (id: %s) has been reviewed"""
% (contribution.getTitle(), str(contribution.getId())))
self.setBody("""Dear Indico user,
The content of your contribution "%s" (id: %s) has been reviewed.
The judgement was: %s
The comments of the reviewer were:
"%s"
Thank you for using our system.
""" % ( contribution.getTitle(), str(contribution.getId()), judgement.getJudgement(),
judgement.getComments())
)
elif isinstance(judgement, RefereeJudgement):
self.setSubject("""[Indico] Your contribution "%s" (id: %s) has been completely reviewed by the referee"""
% (contribution.getTitle(), str(contribution.getId())))
self.setBody("""Dear Indico user,
Your contribution "%s" (id: %s) has been completely reviewed by the assigned referee.
The judgement was: %s
The comments of the referee were:
"%s"
Thank you for using our system.
""" % ( contribution.getTitle(), str(contribution.getId()), judgement.getJudgement(),
judgement.getComments())
)
示例6: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, user, role, conference):
GenericNotification.__init__(self)
self.setFromAddr("Indico Mailer <%s>" % Config.getInstance().getNoReplyEmail())
self.setToList([user.getEmail()])
self.setSubject("""[Indico] You have been removed as %s of the conference "%s" (id: %s)"""
% (role, conference.getTitle(), str(conference.getId())))
self.setBody("""Dear Indico user,
We are sorry to inform you that you have been removed as %s of the conference "%s" (id: %s).
Thank you for using our system.
""" % ( role, conference.getTitle(), str(conference.getId())
))
示例7: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, user, role, conference):
GenericNotification.__init__(self)
self.setFromAddr("Indico Mailer <%s>" % Config.getInstance().getNoReplyEmail())
self.setToList([user.getEmail()])
self.setSubject("""You are no longer a %s of the conference "%s" """
% (role, conference.getTitle()))
self.setBody("""Dear %s,
Please, be aware that you are no longer a %s of the conference "%s":
%s
Kind regards,
Indico on behalf of "%s"
"""% ( user.getStraightFullName(), role, conference.getTitle(), urlHandlers.UHConferenceDisplay.getURL(conference), conference.getTitle()))
示例8: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, user, role, contribution):
GenericNotification.__init__(self)
conference = contribution.event_new.as_legacy
self.setFromAddr("Indico <%s>" % Config.getInstance().getNoReplyEmail())
self.setToList([user.email])
self.setSubject("""You are no longer a %s of a paper for "%s" """ % (role, conference.getTitle()))
self.setBody("""Dear %s,
Please, be aware that you are no longer a %s of the paper entitled "%s" (id: %s) for the conference "%s":
%s
Kind regards,
Indico on behalf of "%s"
""" % ( user.full_name, role, contribution.title, str(contribution.friendly_id), conference.getTitle(), str(urlHandlers.UHConferenceDisplay.getURL(conference)), conference.getTitle()))
示例9: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, task):
GenericNotification.__init__(self)
self.setFromAddr("Indico <%s>" % Config.getInstance().getNoReplyEmail())
self.setToList([task.avatar.getEmail()])
self.setSubject("""
The offline version of the event "%s" is ready to be downloaded
""" % (task.conference.getTitle()))
self.setBody("""
Dear %s,
The offline version for the event "%s" was successfully generated and it is ready to be downloaded.
Download link: %s
Best Regards,
--
Indico""" % (task.avatar.getStraightFullName(), task.conference.getTitle(), task.getDownloadLink()))
示例10: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, maxDate, previousTotal, newTotal, error = None, attainedDate = None):
GenericNotification.__init__(self)
self.setFromAddr("Indico Mailer <%s>" % Config.getInstance().getSupportEmail())
self.setContentType("text/html")
self.setToList(MailTools.getAdminEmailList('Vidyo'))
serverTimezone = info.HelperMaKaCInfo.getMaKaCInfoInstance().getTimezone()
if error:
self.setSubject("""[Vidyo] Old room cleaning failed: %s rooms deleted"""
% str(previousTotal - newTotal))
self.setBody("""Dear Vidyo Manager,<br />
<br />
A cleanup of old Vidyo rooms in <a href="%s">%s</a> encountered the following error:%s<br />
"All rooms before %s (%s, server timezone) should have been deleted but only the date %s was reached.<br />
There were %s rooms before the operation and there are %s rooms left now.<br />
""" % (MailTools.getServerName(),
MailTools.getServerName(),
escape(str(error)),
formatDateTime(getAdjustedDate(maxDate, tz=serverTimezone)),
serverTimezone,
formatDateTime(getAdjustedDate(attainedDate, tz=serverTimezone)),
str(previousTotal),
str(newTotal)))
else:
self.setSubject("""[Vidyo] Old room cleaning successful: %s rooms deleted"""
% str(previousTotal - newTotal))
self.setBody("""Dear Vidyo Manager,<br />
<br />
A cleanup was successfully executed for old Vidyo rooms in <a href="%s">%s</a>.<br />
All rooms attached to events finishing before %s (%s, server timezone) were deleted in the Vidyo server.<br />
There were %s rooms before the operation and there are %s rooms left now.<br />
""" % (MailTools.getServerName(),
MailTools.getServerName(),
formatDateTime(getAdjustedDate(maxDate, tz=serverTimezone)),
serverTimezone,
str(previousTotal),
str(newTotal)))
示例11: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, sendToList, fromEmail, fromName ="Indico Mailer"):
GenericNotification.__init__(self)
self.setContentType("text/html")
self.setFromAddr("%s<%s>"%(fromName, fromEmail))
self.setToList(sendToList)
示例12: __init__
# 需要导入模块: from MaKaC.webinterface.mail import GenericNotification [as 别名]
# 或者: from MaKaC.webinterface.mail.GenericNotification import __init__ [as 别名]
def __init__(self, room, userList):
GenericNotification.__init__(self)
self.setFromAddr("Indico Mailer <%s>"%Config.getInstance().getSupportEmail())
self.setToList(userList)