mahesh_aka_amol
unread,Nov 14, 2008, 11:50:21 AM11/14/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
I have a a family tree; as describd below
>>> son={'first':'Swami', 'last':'Vaidya'}
>>> family={'f':father, 's':son}
>>> family
{'s': {'last': 'Vaidya', 'first': 'Swami'}, 'f': {'last': 'Vaidya',
'first': 'Mahesh'}}
I would like to render this in template.; What I can think of is
{% for key in family.keys %}
<li> { key } </li>
# this will give me father / son
{ % endfor %}
My problem how do I access parts like family['f'']['first'] should
give me "Mahesh" and family['s']['last'] should gibe me 'Swami;
Thank You
-Mahesh