diff --git a/pytm/template_engine.py b/pytm/template_engine.py index a34c3b5..d9be4e1 100644 --- a/pytm/template_engine.py +++ b/pytm/template_engine.py @@ -11,10 +11,10 @@ def format_field(self, value, spec): template = spec.partition(':')[-1] if type(value) is dict: value = value.items() - return ''.join([template.format(item=item) for item in value]) + return ''.join([self.format(template, item=item) for item in value]) elif spec == 'call': return value() elif spec.startswith('if'): return (value and spec.partition(':')[-1]) or '' else: - return super(SuperFormatter, self).format_field(value, spec) \ No newline at end of file + return super(SuperFormatter, self).format_field(value, spec)