I could do with being able to declare a 2D array in my template. I found
the following example in the Cheetah documentation but I can't find how to
emulate it in a template:
#from Cheetah.Template import Template
#extends Template
#set $people = [
{'name' : 'Tom', 'mood' : 'Happy'},
{'name' : 'Dick', 'mood' : 'Sad'},
{'name' : 'Harry', 'mood' : 'Hairy'}
]
<strong>How are you feeling?</strong>
<ul>
#for $person in $people
<li>
$person['name'] is $person['mood']
</li>
#end for
</ul>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/fb73a020-29b0-49ef-8853-dfea3a2c0a3en%40googlegroups.com.