处理通知发送的django包
unicef_notification的Python项目详细描述
#unicef notification
通知是一个提供通知发送处理的库。
“联合国儿童基金会通知”,
]
“backends”:{
“default”:“dCelery嫒email.backends.Celeryemailbackend”
}
通过添加“emailTemplateRoader”并将“app嫒dirs”标记为“false”来更新设置中的“templates”
“templates=[
…
“app嫒dirs”:false,#错误,因为我们在
“选项”下手动设置加载程序:{
“加载程序”:[
…
“django.template.loaders.app_directories.loader”,
“unicef_notification.loaders.emailtemplateloader”,
,
…
]
unicef_notification_template_dir='通知'
这是要在应用程序中放置通知模板的目录。
这些模板使用“上载通知”管理命令加载。
unicef_notification_email_template_prefix='email templates/'
\u用法
在安装程序中定义的'unicef_notification_template_dir'中创建通知模板。
默认值=
“说明”:“示例通知”,
“主题”:“通知主题”,
“内容”:“通知内容”,
“HTML内容”:“HTML格式的通知内容”,
}
更新通知;
使用模板发送通知;
导入使用模板发送通知(模板
context={}
使用模板发送通知(模板
[“到@example.com”],
“<;模板名称>;”,
context,
)
不使用模板发送通知;
来自unicef_notification.utils import send_notification
send_notification(
[“to@example.com”],
subject=“subject of notification”,
content=“content of notification”,
html_content=“html格式的通知内容”,
)
`有关编码标准的完整详细信息。
对代码运行检查,以确保代码符合
$make lint
$make test
coverage report可在“build/coverage”目录中查看,并可使用以下项生成;
\project links
-continuos integration-https://circleci.com/gh/unicef/unicef/unicef notification/tree/develop
-源代码-https://github.com/unicef/unicef notification
通知是一个提供通知发送处理的库。
“联合国儿童基金会通知”,
]
“backends”:{
“default”:“dCelery嫒email.backends.Celeryemailbackend”
}
通过添加“emailTemplateRoader”并将“app嫒dirs”标记为“false”来更新设置中的“templates”
“templates=[
…
“app嫒dirs”:false,#错误,因为我们在
“选项”下手动设置加载程序:{
“加载程序”:[
…
“django.template.loaders.app_directories.loader”,
“unicef_notification.loaders.emailtemplateloader”,
,
…
]
unicef_notification_template_dir='通知'
这是要在应用程序中放置通知模板的目录。
这些模板使用“上载通知”管理命令加载。
unicef_notification_email_template_prefix='email templates/'
\u用法
在安装程序中定义的'unicef_notification_template_dir'中创建通知模板。
“说明”:“示例通知”,
“主题”:“通知主题”,
“内容”:“通知内容”,
“HTML内容”:“HTML格式的通知内容”,
}
更新通知;
使用模板发送通知;
导入使用模板发送通知(模板
context={}
使用模板发送通知(模板
[“到@example.com”],
“<;模板名称>;”,
context,
)
不使用模板发送通知;
来自unicef_notification.utils import send_notification
send_notification(
[“to@example.com”],
subject=“subject of notification”,
content=“content of notification”,
html_content=“html格式的通知内容”,
)
`有关编码标准的完整详细信息。
对代码运行检查,以确保代码符合
$make lint
$make test
coverage report可在“build/coverage”目录中查看,并可使用以下项生成;
\project links
-continuos integration-https://circleci.com/gh/unicef/unicef/unicef notification/tree/develop
-源代码-https://github.com/unicef/unicef notification