有没有办法从 Kiwi TCMS 中的测试用例更新中覆盖通知电子邮件的内容?
Is there a way to override the content of notification email from a test case update in Kiwi TCMS?
我正在尝试更改测试用例更新后发送的通知电子邮件的内容,以更好地阐明更改的内容。事实上,内容很难阅读。
通过下面的 link 配置其他通知内容:
http://kiwitcms.org/blog/atodorov/2018/08/06/how-to-override-templates-for-kiwi-tcms/
通知邮件内容:
Updated on Tue Aug 20 15:47:18 2019
Updated by Admin
--- notes
+++ notes
@@ -1 +1 @@
-TestTest
+TestTest123123
--- text
+++ text
@@ -10,7 +10,7 @@
3. item
*Expected results*:
-
+Test
1. item
2. item
3. item
我设法为 post_case_delete、post_run_save 和 user_registered 复制了示例(来自 link),但是 dir(tcms/templates/email/)缺少一个测试用例更新。
编辑:似乎为其他人添加 dir 和 txt 文件会撤消对 confirm_registration 所做的更改。
有没有办法修改通知邮件中内容的显示方式?
Im trying to change the content of the notification email sent after a test case has been updated to better clarify what has been changed.
您 post 编辑的 link 展示了如何覆盖模板(HTML、电子邮件、任何类型的模板)。然而,传递给模板的上下文(例如哪些变量)取决于渲染该特定模板的后端函数。
As it is, the content is hard to read.
我们认为 diff 是一种非常通用的格式,但如果您有其他建议,最好的方法是从打开带有示例的问题开始,也许是 POC 拉取请求。
在此特定示例中,更改历史记录是自动生成的,因此任何更改都可能会影响处理历史记录的所有内容,但我们需要查看示例以进一步评论。
EDIT: It seems that adding dir and txt files for the others will undo the changes made to confirm_registration.
这与原问题无关。我将不得不再次查看您到底在做什么,然后告诉您 if/where 错误所在。 Django 中的模板引擎正在尝试使用它找到的具有给定名称的第一个模板。搜索目录路径告诉它在哪里寻找这些模板。如果您以某种方式隐藏了博客中的文件 post,那么应用程序将无法找到它们,因此您不会看到您期望的覆盖更改。
也关注 https://github.com/kiwitcms/Kiwi/issues/1076(没有直接关系但在同一域 space)。
我正在尝试更改测试用例更新后发送的通知电子邮件的内容,以更好地阐明更改的内容。事实上,内容很难阅读。
通过下面的 link 配置其他通知内容: http://kiwitcms.org/blog/atodorov/2018/08/06/how-to-override-templates-for-kiwi-tcms/
通知邮件内容:
Updated on Tue Aug 20 15:47:18 2019
Updated by Admin
--- notes
+++ notes
@@ -1 +1 @@
-TestTest
+TestTest123123
--- text
+++ text
@@ -10,7 +10,7 @@
3. item
*Expected results*:
-
+Test
1. item
2. item
3. item
我设法为 post_case_delete、post_run_save 和 user_registered 复制了示例(来自 link),但是 dir(tcms/templates/email/)缺少一个测试用例更新。
编辑:似乎为其他人添加 dir 和 txt 文件会撤消对 confirm_registration 所做的更改。
有没有办法修改通知邮件中内容的显示方式?
Im trying to change the content of the notification email sent after a test case has been updated to better clarify what has been changed.
您 post 编辑的 link 展示了如何覆盖模板(HTML、电子邮件、任何类型的模板)。然而,传递给模板的上下文(例如哪些变量)取决于渲染该特定模板的后端函数。
As it is, the content is hard to read.
我们认为 diff 是一种非常通用的格式,但如果您有其他建议,最好的方法是从打开带有示例的问题开始,也许是 POC 拉取请求。
在此特定示例中,更改历史记录是自动生成的,因此任何更改都可能会影响处理历史记录的所有内容,但我们需要查看示例以进一步评论。
EDIT: It seems that adding dir and txt files for the others will undo the changes made to confirm_registration.
这与原问题无关。我将不得不再次查看您到底在做什么,然后告诉您 if/where 错误所在。 Django 中的模板引擎正在尝试使用它找到的具有给定名称的第一个模板。搜索目录路径告诉它在哪里寻找这些模板。如果您以某种方式隐藏了博客中的文件 post,那么应用程序将无法找到它们,因此您不会看到您期望的覆盖更改。
也关注 https://github.com/kiwitcms/Kiwi/issues/1076(没有直接关系但在同一域 space)。