Sorry for not explaining it more:

chain is a dictionary of lists chains {'project1': ['item1', 'item2'],
'project2': ['item3']}
So the key to the dictionary is basically a project name which I get
when looping over the projects in the first loop. Now the second loop
should be over the list of chains but the dictionary key is changing
because the name of the project is changing but I can not find a way
to do this in Django templates.

On Feb 13, 8:47 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Sat, Feb 13, 2010 at 1:30 PM, Madis <madisv...@gmail.com> wrote:
> > I'm trying to write the following but there seems to be no solution on
> > the web for this.
>
> > In a template:
> > {% for project in projects %}
> >  {% for chain in chains.project.name %} <--- project.name should be
> > dynamic
> >  {% endfor %}
> > {% endfor %}
>
> What is chains? What is chains.project? What do you mean project.name should
> be dynamic? How does whatever happens when you try to render that template
> differ from what you are expecting?
>
> Karen

-- 
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