Reputation: 13880
I have templatetag:
@register.simple_tag
def get_something(data, var1, var2):
if data:
if var1:
if var2:
return True
return False
And ho to insert this to {% if ... %} block? This is not working:
{% if get_something 1 1 0 %}
Upvotes: 1
Views: 50
Reputation: 799082
You can't. Have your tag set a variable in the context, and use that variable instead.
Upvotes: 2