Re: manipulate dictionnary in django's templates

2006-05-05 Thread Malcolm Tredinnick
On Fri, 2006-05-05 at 12:16 +0200, [EMAIL PROTECTED] wrote: > > {% for data in mydict.items %} > > key: {{ data.0 }} > > value: {{ data.1 }} > > {% endfor %} > > Thanks for you answer ... but I still have a problem : how to do a real > dictionnary lookup.

Re: manipulate dictionnary in django's templates

2006-05-05 Thread zeuxis
> {% for data in mydict.items %} > key: {{ data.0 }} > value: {{ data.1 }} > {% endfor %} Thanks for you answer ... but I still have a problem : how to do a real dictionnary lookup. Here is an example of what I'm trying to do : parent = {4 : 'parent1',

Re: manipulate dictionnary in django's templates

2006-05-05 Thread Malcolm Tredinnick
On Fri, 2006-05-05 at 11:46 +0200, [EMAIL PROTECTED] wrote: > Hi all, > > I've trouble to understand how it is possible to deal (i.e. work) with > python dictionnaries in django templates > > Say I have a dictionnary that is called mydict, how can I iterate > through it's keys/values : I can get

manipulate dictionnary in django's templates

2006-05-05 Thread zeuxis
Hi all, I've trouble to understand how it is possible to deal (i.e. work) with python dictionnaries in django templates Say I have a dictionnary that is called mydict, how can I iterate through it's keys/values : I can get the keys ... {% for keys in mydict%} {{ keys }} {% end