On Fri, Jun 4, 2010 at 10:15 AM, ChuanRen wrote:
> for example:
> keys=[item1,item2]
> obj={item1:1,item2:2}
>
> the template:
> {%for key in keys%}
> {{obj.key}}
> {%endfor%}
>
> In this example, the key in template will resolved to item1 and item2,
> I thought:
> {{obj.{{key
> will work,
for example:
keys=[item1,item2]
obj={item1:1,item2:2}
the template:
{%for key in keys%}
{{obj.key}}
{%endfor%}
In this example, the key in template will resolved to item1 and item2,
I thought:
{{obj.{{key
will work, but it output a error.
Any approach can solve this problem?
--
You rec
2 matches
Mail list logo