{% for k, v in d.items %}
{{k}} {{v}}
{% endfor %}

On Feb 14, 1:58 pm, Madis <madisv...@gmail.com> wrote:
> Why will this not work or how should i write it to work:
>
> I have the following dictionary:
> projects = {u'NetMinutes': {'chains': [u'Arendus', u'Uuslahendus']},
> u'Veel': {'chains': []}}
>
> Now in a template I want to iterate over them as follows:
> {% for project in projects %}
> <h1 class="a">{{ project }}</h1>
>   {% for chain in project.chains %}
>   -- {{ chain }}
>   {% endfor %}
> {% endfor %}
>
> It iterates over the projects and prints out the project names but
> will not iterate over the project.chains.
> Maybe someone can give me some clues?
>
> Regards,
> Madis

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to