Vertical table template Flask

0

I'm a beginner in flask and in front end I have a table that returns me information from an API, but instead of it playing information in the table vertically it's going to horizontal, how do I fix it? / p>

<!doctype html>
<html>
<head>
    <title>Minha pagina</title>
    <meta charset="utf-8" />
</head>
<body>
    <h1>Teste de API</h1>
    <br>

    <table border = "1">
        <tr>
            <td align= middle width=100 bgcolor= #DAA520> ID </td>
            <td align= middle width=100 bgcolor= #DAA520> TITLE</td>
        </tr>
        <tr>
        {% for i in range(4) %}
            <td align= middle width=150>{{data[i] ["id"]}}</td>
            <td align= middle width=150>{{data[i]["title"]}}</td>

        {% endfor %}

        </tr>

    </table>

</body>


</html>

    
asked by anonymous 10.04.2018 / 20:51

1 answer

1
{% for i in range(4) %}
<tr>
        <td align= middle width=150>{{data[i] ["id"]}}</td>
        <td align= middle width=150>{{data[i]["title"]}}</td>
</tr>
{% endfor %}
    
10.04.2018 / 21:27