-1

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 %}

1 Answers1

1

HTML does not provide loops or any other programming features, it is a markdown language. The syntax you are using is of a ejs, which stands for Embedded JavaScript templating. Read this.