{% for file in FILENAME %} {% if os.path.isdir(file) %} {{file}}
{% else %} {{file}}
{% endif %} {% endfor %}