What is the difference between doing:
{% if my_var not in my_list %}
{{ my_var }}
{% endif %}
and
{% if not my_var in my_list %}
{{ my_var }}
{% endif %}
when my_list is None and my_var is "1" in templates? In the first case {{my_var}} doesn’t get printed, but it does in the second.
Since
my_listisn’t a container at all, both comparisons return false. The difference is that the second turns the false into a true and printsmy_var.