templates - Python Tornado: nested templating -


is possible sort of eval in tornado templates?

let me show example of wish do:

{% c in columns %}     <!-- cdata dictionary, , columns list -->     <div class="cell"> {{ cdata[ {{ c }} ] }} </div> {% end %} 

e.g. want evaluate current value in columns, , use key search in cdata dictionary.

how do that?

thanks

expressions in tornado templates cannot nested, they're python expressions, gives flexibility want. includes calling python eval if that's need, looks in case need {{ cdata[c] }}.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

linux - gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now -

sql - MySQL - Finding Empty relations -