本文整理汇总了Python中trac.notification.NotifyEmail.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python NotifyEmail.__init__方法的具体用法?Python NotifyEmail.__init__怎么用?Python NotifyEmail.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类trac.notification.NotifyEmail
的用法示例。
在下文中一共展示了NotifyEmail.__init__方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env):
NotifyEmail.__init__(self, env)
self.prev_cc = []
ambiguous_char_width = env.config.get('notification',
'ambiguous_char_width',
'single')
self.ambiwidth = 2 if ambiguous_char_width == 'double' else 1
示例2: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env):
NotifyEmail.__init__(self, env)
self.prev_cc = []
self.ambiguous_char_width = env.config.get('notification',
'ambiguous_char_width',
'single')
self.text_widths = {}
示例3: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env, subject=None, data=None):
NotifyEmail.__init__(self, env)
self.to = []
self.cc = []
self.from_email = env.config.get("notification", "smtp_from")
self.subject = subject or ""
# If string given, place it into body variable, otherwise use dict or empty dict
self.data = {"body": data} if isinstance(data, basestring) else data or {}
示例4: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env, recipient, body, link):
NotifyEmail.__init__(self, env)
self.recipient = recipient
self.data = {
'body': body,
'link': link,
'project_name': env.project_name,
'project_url': env.project_url or self.env.abs_href(),
}
示例5: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env):
NotifyEmail.__init__(self, env)
self.from_name = self.config.get('fullblog-notification', 'from_name')
self.from_email = self.config.get('fullblog-notification', 'from_email')
self.reply_to_email = self.config.get('fullblog-notification', 'reply_to_email') or self.from_email
self.notification_actions = self.config.getlist('fullblog-notification',
'notification_actions')
self.no_notification_categories = self.config.getlist('fullblog-notification',
'no_notification_categories')
示例6: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env, data, template_name=None):
NotifyEmail.__init__(self, env)
locale_dir = pkg_resources.resource_filename(__name__, 'locale')
add_domain(self.env.path, locale_dir)
if template_name:
self.template_name = template_name
self._data = data
if self._data and self._data['user_data']:
# self._locale_string = self._data['user_data']['language'] # not used at the moment
self._email_adr = self._data['user_data']['email']
示例7: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env, project, message, authname):
NotifyEmail.__init__(self, env)
self.from_email = env.config.get('notification', 'smtp_from')
add_auth_url = project.get_url() + "admin/general/permissions"
self.project = project
self.env = env
self.data = {'project_name': project.project_name,
'message': message,
'authname': authname,
'add_auth_url': add_auth_url}
示例8: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env):
NotifyEmail.__init__(self, env)
self.prev_cc = []
示例9: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env):
NotifyEmail.__init__(self, env)
self.prev_cc = []
self.ambiguous_char_width = env.config.get("notification", "ambiguous_char_width", "single")
self.text_widths = {}
示例10: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env):
NotifyEmail.__init__(self, env)
示例11: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env, milestone):
NotifyEmail.__init__(self, env)
self.milestone = milestone
示例12: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env):
NotifyEmail.__init__(self, env)
# Override the template type to always use NewTextTemplate
if not isinstance(self.template, NewTextTemplate):
self.template = Chrome(env).templates.load(
self.template.filepath, cls=NewTextTemplate)
示例13: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env):
NotifyEmail.__init__(self, env)
self.hdf = HDFWrapper(loadpaths=self.get_templates_dirs())
populate_hdf(self.hdf, env)
示例14: __init__
# 需要导入模块: from trac.notification import NotifyEmail [as 别名]
# 或者: from trac.notification.NotifyEmail import __init__ [as 别名]
def __init__(self, env):
NotifyEmail.__init__(self, env)
self.cronconf = CronConfig(self.env)