python - 在 HTML 电子邮件中以列表形式呈现所有内容
问题描述
我到处搜索,但找不到解决方案。如何将列表插入 HTML 电子邮件?
mylist = [1, 2, 3, 4] # Can be longer and contain numbers and letters
# I have reduced my HTML Email code
html = """\
{% for i in mylist%}
<tr>
<td> {{ i }} </td>
</tr>
{& endfor &}
""".format(mylist)
我已经尝试过了,但效果不佳。
我感谢您的帮助。提前致谢
解决方案
{% endfor %}
而不是{& endfor &}
?
推荐阅读
- reactjs - 过滤 && 排序 ag-grid 后如何获取数据?
- arrays - 将 AnsiChar 数组转换为字符串:Delphi 10.3
- bash - 如何在 bash 中的复合命令之前放置重定向?
- spring-boot - CorsConfiguration.setMaxAge 在 SpringBoot 应用程序中不起作用
- python - 如何减少神经网络训练时间
- kubernetes - 为什么 Kubernetes Secret 既有键又有名称?
- xml - 引用的文件包含错误 (http://testng.org/testng-1.0.dtd)
- javascript - 出现错误 Module not found: Error: Can't resolve '../components/***' when webpack build, 我该如何解决这个问题?
- excel - 如何在没有代码的情况下将我为整列记录的宏运行到另一列?
- python - 如何使用 Kubernetes Python API 获取集群信息?