|
@@ -36,13 +36,16 @@ def _instrumented_test_render(self, *args, **data):
|
|
|
"""
|
|
"""
|
|
|
def mako_callable_(context, *args, **kwargs):
|
|
def mako_callable_(context, *args, **kwargs):
|
|
|
template_rendered.send(sender=self, template=self, context=context)
|
|
template_rendered.send(sender=self, template=self, context=context)
|
|
|
- return self.original_callable_(context, *args, **kwargs)
|
|
|
|
|
- self.original_callable_ = self.callable_
|
|
|
|
|
|
|
+ return self.original_callable_[-1](context, *args, **kwargs)
|
|
|
|
|
+ if hasattr(self, 'original_callable_'):
|
|
|
|
|
+ self.original_callable_.append(self.callable_)
|
|
|
|
|
+ else:
|
|
|
|
|
+ self.original_callable_ = [self.callable_]
|
|
|
self.callable_ = mako_callable_
|
|
self.callable_ = mako_callable_
|
|
|
try:
|
|
try:
|
|
|
- response = runtime._render(self, self.original_callable_, args, data)
|
|
|
|
|
|
|
+ response = runtime._render(self, self.original_callable_[-1], args, data)
|
|
|
finally:
|
|
finally:
|
|
|
- self.callable_ = self.original_callable_
|
|
|
|
|
|
|
+ self.callable_ = self.original_callable_.pop()
|
|
|
return response
|
|
return response
|
|
|
|
|
|
|
|
|
|
|