I have a project in django and i am trying to render html to pdf.
I'm trying to build a table, and i have two varaibles date1
and date2
and i need to do a Diff
between date1
and date2
.
If the result is more than 20 woriking days
show 1
if not show 0
MY HTML
{% for item in obj %}
<tr>
<td>
{% if item.date1 - item.date2 > 20 %}
1
{% else %}
0
{% endif %}
</td>
</tr>
{% endfor %}