def _render(self, context, output, rs): old_template = context_manager._set_current_template(self) old_context = context_manager._set_current_context(context) try: for block in self.section.blocks: block.render(context, output, rs) finally: context_manager._set_current_template(old_template) context_manager._set_current_context(old_context)
def _render(self, context, output, rs): indent = rs.indent rs.indent += self.indent old_template = context_manager._set_current_template(self.partial) try: self.partial.compile() self.partial._render(context, output, rs) finally: rs.indent = indent context_manager._set_current_template(old_template)