{% extends "layout.html" %} {% block content %}

These are all the files

{% for filename in listingfiles %} {% if filename.lower().endswith(('.png', '.jpg', '.jpeg')) %} {% for jsonfile in jsonfiles %} {% if filename[0:9] == jsonfile[0:9] %}
{{ jsonfile }}

{{listofdicts[0]["name"]}}
{{listofdicts[0]["email"]}}
{{listofdicts[0]["friend"]}}
{{listofdicts[0]["content"]}}

{% endif %} {% endfor %} {% elif filename.lower().endswith(('.mp4')) %} {% for jsonfile in jsonfiles %} {% if filename[0:9] == jsonfile[0:9] %}
{{ jsonfile }}

{{listofdicts[1]["name"]}}
{{listofdicts[1]["email"]}}
{{listofdicts[1]["friend"]}}
{{listofdicts[1]["content"]}}

{% endif %} {% endfor %} {% elif filename.lower().endswith(('.mp3')) %} {% for jsonfile in jsonfiles %} {% if filename[0:9] == jsonfile[0:9] %}
{{ jsonfile }}

{{listofdicts[2]["name"]}}
{{listofdicts[2]["email"]}}
{{listofdicts[2]["friend"]}}
{{listofdicts[2]["content"]}}

{% endif %} {% endfor %} {% endif %} {% endfor %}
{% endblock %}