jinja templates tables

Solutions on MaxInterview for jinja templates tables by the best coders in the world

showing results for - "jinja templates tables"
Michelle
22 Feb 2019
1<table>
2{% for item in items %}
3<TR>
4   <TD class="c1"><IMG src="favicon.ico"></TD>
5   <TD class="c2">{{item.date}}</TD>
6   <TD class="c3">{{item.id}}</TD>
7   <TD class="c4"><SPAN>{{item.position}}</SPAN></TD>
8   <TD class="c5"><SPAN>{{item.status}}</SPAN></TD>
9</TR>
10{% endfor %}
11</table>
Warren
29 Feb 2017
1<table>
2{% for item in items %}
3<TR>
4   <TD class="c1"><IMG src="favicon.ico"></TD>
5   <TD class="c2">{{item.date}}</TD>
6   <TD class="c3">{{item.id}}</TD>
7   <TD class="c4"><SPAN>{{item.position}}</SPAN></TD>
8   <TD class="c5"><SPAN>{{item.status}}</SPAN></TD>
9</TR>
10{% endfor %}
11</table>
12
Romina
26 Apr 2017
1items = []
2for i in range(1, 11):
3    i = str(i)
4
5    # dict == {}
6    # you just don't have to quote the keys
7    an_item = dict(date="2012-02-" + i, id=i, position="here", status="waiting")
8    items.append(an_item)
9
10# ... your code here ...
11
12template.render(items=items)
13