Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

dynamic html table python

<table>
 <thead>
  {%- for column in columns %}
     <th>{{ column }}</th>
  {%- endfor %}
 </thead>

 <tbody>
 {%- for row in items %}
    <tr>
    {%- for column in columns %}
       <td>{{ row|attr(column) }}</td>
    {%- endfor %}
    </tr>
 {%- endfor %}
 </tbody>
 </table>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dynamic #html #table #python
ADD COMMENT
Topic
Name
1+9 =