defunkt/pystache — Issue #78: Pystache can't access outer variables in loops
Author: abentley
Created: 2012-01-04 16:07:01+00:00
State: open

The following fails, but should work (and the equivalent does work with mustache.js)

>>> import pystache
>>> template = "{{#loop}}{{inner}} {{outer}}{{/loop}}"
>>> data = {
... "loop": [{"inner": "INNER"}],
... "outer": "OUTER"
... }
>>> pystache.render(template, data)
u'INNER '

Tested with 0.3.1