Re: Accessing an element in a list inside a dictionary

2006-05-16 Thread Adrian Holovaty
On 5/16/06, Facundo Casco <[EMAIL PROTECTED]> wrote: > Hi, I have this structure provs = {'0134': ['PSM', 0], '0135': ['GRAN', > 0]} that I need to access from a template. > [...] > what I need is > > 0134 PSM 0 This should do the trick: {% for prov in provs.items %} {{ prov.0 }} {{ prov.1.0 }}

Accessing an element in a list inside a dictionary

2006-05-16 Thread Facundo Casco
Hi, I have this structure provs = {'0134': ['PSM', 0], '0135': ['GRAN', 0]} that I need to access from a template. What I have in the template is: {% for prov in provs %} {{prov}} {{prov.0}} {{prov.1}} {% endfor %} it outputs 0134 0 1 what I need is 0134 PSM 0 Can someone tell me what I'