【发布时间】:2022-01-19 16:52:20
【问题描述】:
我正在使用 django 服务器发送用户电子邮件通知,我遇到了一个地方,我需要说明这个元素是否不存在在文本下方添加边距/空格
<tr style="padding:0;margin:0;" height="30">
<td width="190" style="font-family:Roboto;color:#000000;font-weight:bold">Date</td>
<td width="400" style="font-family:Roboto;color:#000000;">{{ processed_datetime|date:"d/m/Y H:i" }}</td>
<!--I want to say here if there is no other party email add this element underneath -->
{% if ! counterpart.email} <!--not sure about this line syntax -->
<tr style="padding:0;margin:0;" height="20">
<td width="190" height="20" style="font-family:Roboto;color:#000000;font-size:24px;line-height:32px;"></td>
</tr>
【问题讨论】:
标签: django templates django-templates