{% for Ltarp in smth.3 %}
SHOULD BE
{% for Ltarp in smth.2 %}
'cos Lans only has 3 elements and Ltarp is Lans[2].
Chris
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of gintare
Sent: 07 January 2011 08:52
To: Django users
Subject: list of lists in template
in view.py
...
Ltarp.append([item.Wordword, item.WordTranslEn, item.WordNotesGram,
item.WordConcl])
..
Lans.append([sen.Sent, sen.SentTransl, Ltarp ] )
in template.html
{% if Lans %}
{% for smth in Lans %}
<table >
<tr> <td width='500'> {{smth.0}} </td></tr>
{% for Ltarp in smth.3 %}
<tr>
<td width='500'> {{Ltarp.0}} </td>
</tr>
{% endfor %}
</table>
{% endfor %}
{% endif %}
###########################
the rows from smth.0 are shown
the rows from Ltarp in smth.3, i.e. {{Ltarp.0}} are not shown.
I tried also:Ltarp, Ltarp[0], smth.Ltarp.0
nothing works in the second for cycle where i need to get items from
list built in third item of list in the first for cycle.
Could you please help with syntax, when i need to dislay item from
list in another list in template
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.