Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- names = {
- 'name1': (
- 'sarah',
- '20',
- {
- 'a1': 'aa', 'a2': 'az', 'a3': '1',
- 'b1': 'bb', 'b2': 'bz', 'c3': '0',
- 'c1': 'cc', 'c2': 'cz', 'c3': '2',
- }
- ),
- 'name2': (
- 'dave',
- '24',
- {
- 'a1': 'aa', 'a2': 'az', 'a3': '1',
- 'b1': 'bb', 'b2': 'bz', 'c3': '0',
- 'c1': 'cc', 'c2': 'cz', 'c3': '2',
- }
- ),
- 'name3': (
- 'rick',
- '22',
- {
- 'a1': 'aa', 'a2': 'az', 'a3': '1',
- 'b1': 'bb', 'b2': 'bz', 'c3': '0',
- 'c1': 'cc', 'c2': 'cz', 'c3': '2',
- }
- )
- }
- pd = {
- 'msg': names,
- }
- return render(request, 'basketball.html', context=pd)
- {% for id, info in msg.items %}
- <tr>
- <td>{{ info.0 }}</td>
- <td>{{ info.1}}</td>
- {% for s, v in info.2.items %}
- <td>{{ s }}<br />{{ v }}</td>
- {% endfor %}
- </tr>
- {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement