I have a table in SQLite3 and I need to take some columns in the table and output them to a web page (using bottle). I'm passing the results from a cursor.fetchall()
into a for loop in the HTML template but am getting a name error in the for loop, indicating that the name "x" is not defined. Any idea on what might be causing this? Code included below:
{% for x in result %}
<tr>
<td>{{x[0]}}</td>
<td>{{x[1]}}</td>
<td>{{x[2]}}</td>
<td>{{x[3]}}</td>
</tr>
{% endfor %}