Search code examples
pythonpyramidjinja2

Jinja2 template with extension .html on pyramid?


How can I use a jinja2 template with a .html extension in pyramid? For instance, I want the view configuration to look like,

@view_config(context=MyModel, renderer='templates/index.html')
def home_view(request):
...

Is it possible?


Solution

  • config.add_renderer('.html', 'pyramid_jinja2.renderer_factory')