(self, template_name)
| 38 | return Template(self.env.from_string(template_code), self) |
| 39 | |
| 40 | def get_template(self, template_name): |
| 41 | try: |
| 42 | return Template(self.env.get_template(template_name), self) |
| 43 | except jinja2.TemplateNotFound as exc: |
| 44 | raise TemplateDoesNotExist(exc.name, backend=self) from exc |
| 45 | except jinja2.TemplateSyntaxError as exc: |
| 46 | new = TemplateSyntaxError(exc.args) |
| 47 | new.template_debug = get_exception_info(exc) |
| 48 | raise new from exc |
| 49 | |
| 50 | @cached_property |
| 51 | def template_context_processors(self): |