def render(self, template, *args, **kwargs): kwargs['app'] = self.template_vars rendered_template = jinja_render(template, *args, **kwargs) self.write(rendered_template)