Commit c39b8b84 by Pieter van de Bruggen

Fixing some basic Partial rendering problems.

parent 5c9bdd56
......@@ -5,7 +5,6 @@ import inspect
def call(view, x, template=None):
if callable(x):
(args, _, _, _) = inspect.getargspec(x)
print args
if len(args) is 0:
x = x()
elif len(args) is 1 and args[0] == 'self':
......@@ -151,7 +150,9 @@ class Template(object):
self.otag, self.ctag = name.split()
self._compile_regexps()
elif captures['tag'] == '>':
buffer += self._parse(self.view.partial(name))
tmpl = Template(self.view.partial(name))
tmpl.view = self.view
buffer += tmpl._parse()
elif captures['tag'] in ['#', '^']:
try:
self._parse(template, name, pos)
......
......@@ -31,6 +31,7 @@ def buildTest(testData, spec):
files.append(os.path.join(Loader.template_path, filename))
p = open(files[-1], 'w')
p.write(partials[key])
p.close()
self.assertEquals(pystache.render(template, data), expected)
finally:
[os.remove(f) for f in files]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment