def set_memory_loader(app): aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({ 'template.jinja2': '{{text}}', 'error.jinja2': '{{1/0}}', }))