Context:
I have a piece of HTML that I want to dispaly in the template just in case a function return "true".
Details:
My function
def show_avg_kpi():
return config.avg_times_visible
register.filter('show_avg_kpi', show_avg_kpi)
Template ( is the piece of code to display or not):
{% if show_avg_kpi %}
<HTML CODE>
{% endif %}
I want something like this, but I don't know how to save the result of the show_avg_kpi function in a variable to use it with the {% if %} tags
Thank you in advance.