Re: Strange behaviour with templates, dictionarys, key/value, tuple as key and nested for loop Bug?

2009-03-11 Thread johan . uhle
Of course you are right. I already changed that in my real code. This one here was just for having as simple code as possible in the mailing list post. This reminds me of this tweet: http://twitter.com/pht/status/1302494813 I always try to keep an eye on naming stuff, even if it means thinking

Re: Strange behaviour with templates, dictionarys, key/value, tuple as key and nested for loop Bug?

2009-03-11 Thread Malcolm Tredinnick
On Wed, 2009-03-11 at 02:25 -0700, johan.u...@student.hpi.uni-potsdam.de wrote: > Thanks a lot. I was just blind eyed yesterday I think. Corrected code > is: > > {% for key,value in dictionary.items %} > {{key|date:"Y-m-d"}} > {% for key,value in value.items %} >

Re: Strange behaviour with templates, dictionarys, key/value, tuple as key and nested for loop Bug?

2009-03-11 Thread johan . uhle
Thanks a lot. I was just blind eyed yesterday I think. Corrected code is: {% for key,value in dictionary.items %} {{key|date:"Y-m-d"}} {% for key,value in value.items %} {{ key.0|date:"H.i" }} - {{ key.1|date:"H.i" }} {{ value }} //

Strange behaviour with templates, dictionarys, key/value, tuple as key and nested for loop Bug?

2009-03-10 Thread johan.uhIe
I have the following hierarchical data structure making use of the datetime-object, dictionarys, arrays and tuples all at once. { datetime : { (datetime, datetime) : [,] } } So a dictionary, holding datetime objects as keys and another dictionary as value. The