I have the following dictionary passed to a render function, with sources being a list of strings and title being a string potentially equal to one of the strings in sources
{% for source in sources %} {{ source }} {% ifequal title source %} Just now! {% endifequal %} {% endfor %} or {% for source in sources %} {{ source }} {% if title == source %} Just now! {% endif %} {% endfor %}
See Django Doc