1<ul class="teachers">
2 {% for teacher in teachers %}
3 <li> <h2> {{ teacher.name }} </h2>
4 <ul>
5 {% for x in teacher.name.courses %}
6 <li> {{ x }} </li>
7 {% endfor %}
8 </ul>
9 </li>
10 {% endfor %}
11</ul>
12
1from flask import Flask, render_template
2
3from teachers import TEACHERS
4
5app = Flask(__name__)
6
7
8@app.route('/')
9def index():
10 return render_template("teachers.html", teachers=TEACHERS)
11