0

I wish to know how to build a table (in HTML) where the row expand with the row I input on it.

For a static table I've used:

 <table style="width:100%">
  <tr>
    <th>Symbol</th>
    <th>Name</th>
    <th>Shares</th>
    <th>Total</th>

  </tr>
  <tr>
    <td>{{ symbol }}</td>
    <td>{{ name }}</td>
    <td>{{ number }}</td>
    <td>{{ total }}</td>
  </tr>

</table>

How to expand the row of the table with input Flask Python?

Maybe some kind of loop in the html part?

I'm a little lost

0

After a good night, I found my answer:

A nested dictionary in python + an iterative in jinja (html page):

    {% for dict_item in parent_dict %}

    <tr>
        {% for key, value in dict_item.items() %}
            <td>{{value}}</td>
        {% endfor %}
    </tr>
    {% endfor %}

I don't delete this post because I maybe it's could help (I would help me).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .