nested list flask

Solutions on MaxInterview for nested list flask by the best coders in the world

showing results for - "nested list flask"
Anthony
20 Apr 2018
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
Salvatore
02 Feb 2017
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