I have writing a template tag and take it to the templates:
{% check_somethings value1 value2 as is_checked %}
{% if is_checked %}
# do it
{% endif %}
But there are some errors. I am doing so right?
check_somethings takes 2 arguments
There are:
@register.simple_tag
def check_somethings(value1, value2):
if Mymodel.objects.filter(f1=value1, f2=value2):
return True
else:
return False