当前位置: 首页>>代码示例>>Python>>正文


Python GenericNotification.__init__方法代码示例

本文整理汇总了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)
开发者ID:Ictp,项目名称:indico,代码行数:10,代码来源:pendingQueues.py

示例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")
开发者ID:davidmorrison,项目名称:indico,代码行数:12,代码来源:mail.py

示例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")
开发者ID:aninhalacerda,项目名称:indico,代码行数:13,代码来源:mail.py

示例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")
开发者ID:aninhalacerda,项目名称:indico,代码行数:14,代码来源:mail.py

示例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())
     )
开发者ID:davidmorrison,项目名称:indico,代码行数:54,代码来源:contributionReviewing.py

示例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())
        ))
开发者ID:bubbas,项目名称:indico,代码行数:15,代码来源:paperReviewing.py

示例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()))
开发者ID:Ictp,项目名称:indico,代码行数:17,代码来源:paperReviewing.py

示例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()))
开发者ID:fph,项目名称:indico,代码行数:17,代码来源:contributionReviewing.py

示例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()))
开发者ID:Ictp,项目名称:indico,代码行数:19,代码来源:offlineEventGenerator.py

示例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)))
开发者ID:VishrutMehta,项目名称:indico,代码行数:39,代码来源:mail.py

示例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)
开发者ID:arturodr,项目名称:indico,代码行数:8,代码来源:mail.py

示例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)
开发者ID:Ictp,项目名称:indico,代码行数:6,代码来源:components.py


注:本文中的MaKaC.webinterface.mail.GenericNotification.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。