I successfully loaded the csv file as a list of lists, passing that list over the the sheet template. Like so:
@app.route("/sheet", methods=["GET"])
def get_sheet():
with open("survey.csv", "r") as file:
reader = csv.reader(file)
data = list(list(item) for item in csv.reader(file,delimiter=','))
return render_template("sheet.html",data=data)
In my sheet template, I attempt to create a new row of table for each list, with a new cell for each item of list:
<tb>
{% for row in data %}
<tr>
{% for item in row %}
<td>{{item}}</td>
{% endfor %}
</tr>
{% endfor %}
</tb>
But in my browser, all items are simply listed on one line. Where am I going wrong. Help would be much appreciated.