I am trying to pass multiple parameters to my template tag:
@register.filter
def val_color(val, min_val):
if val >= min_val:
return 'red'
return 'black'
template:
{% for x in data.vals %}
<font color="x|data.min_val|val_color">x</font>
{% endfor %}
this approach does not work. Any ideas how to do this? Note that it would be too messy if I have to convert x numbers into objects with a value and the min_val properties so I am hoping there is a proper solution for this issue.