diff options
Diffstat (limited to 'pystache/parsed.py')
-rw-r--r-- | pystache/parsed.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pystache/parsed.py b/pystache/parsed.py index d791be4..0055837 100644 --- a/pystache/parsed.py +++ b/pystache/parsed.py @@ -38,7 +38,7 @@ class ParsedTemplate(object): def add(self, node): self._parse_tree.append(node) - def render(self, context): + def render(self, engine, context): """ Returns: a string of type unicode. @@ -47,9 +47,10 @@ class ParsedTemplate(object): def get_unicode(val): if callable(val): return val(context) - return val + if isinstance(val, basestring): + return val + return val.render(engine, context) parts = map(get_unicode, self._parse_tree) s = ''.join(parts) return unicode(s) - |