You can use the built-in widthratio
template tag.
- a*b use
{% widthratio a 1 b %}
- a/b use
{% widthratio a b 1 %}
Note: the results are rounded to an integer before returning.
@see https://docs.djangoproject.com/en/dev/ref/templates/builtins/
You can use the built-in widthratio
template tag.
{% widthratio a 1 b %}
{% widthratio a b 1 %}
Note: the results are rounded to an integer before returning.
@see https://docs.djangoproject.com/en/dev/ref/templates/builtins/