{% widthratio value1 value2 value3 %}
表示: value1/value2*value3
乘法:
<span class="price" style="text-align: center;"> {% for price in item.price_id.all %} {% widthratio price.price 1 item.repair_num %}{{price.unit}} {% endfor %} </span>
除法:
<span class="price" style="text-align: center;"> {% for price in item.price_id.all %} {% widthratio price.price 10 item.repair_num %}{{price.unit}} {% endfor %} </span>
{{ value1|add:value2 }}
加法
{{ value1|add:value2 }}
减法
{{ value1|add:-value2 }}