From 56b33145e7e4e4f509eb0f9a09f5eccf3ece0419 Mon Sep 17 00:00:00 2001 From: Matt Henderson Date: Wed, 14 Aug 2013 17:40:48 -0700 Subject: [PATCH] Fixed custom jinja2 templates being ignored when setting template_path --- IPython/html/notebookapp.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/IPython/html/notebookapp.py b/IPython/html/notebookapp.py index 9e261117b..41669b21f 100644 --- a/IPython/html/notebookapp.py +++ b/IPython/html/notebookapp.py @@ -172,12 +172,15 @@ class NotebookWebApplication(web.Application): # IPython stuff mathjax_url=ipython_app.mathjax_url, config=ipython_app.config, - use_less=ipython_app.use_less, - jinja2_env=Environment(loader=FileSystemLoader(template_path)), + use_less=ipython_app.use_less ) # allow custom overrides for the tornado web app. settings.update(settings_overrides) + + # create a jinja2 environment using the template path and store it in settings + settings.jinja2_env=Environment(loader=FileSystemLoader(settings.template_path)) + return settings def init_handlers(self, settings):