def render(self, context):
catch_outputs = []
for catch in self.manager.get_catches(self.hook_name):
template = loader.get_template(catch.template)
c_ctx = context['_hooks_%s' % self.hook_name][catch._id]
output = template.render(c_ctx)
catch_outputs.append(output)
return ''.join(catch_outputs)
评论列表
文章目录