##// END OF EJS Templates
Modified initial template_path to pickup any overridden value by the user
Matt Henderson -
Show More
@@ -149,7 +149,7 class NotebookWebApplication(web.Application):
149 149 # Note that the URLs these patterns check against are escaped,
150 150 # and thus guaranteed to be ASCII: 'héllo' is really 'h%C3%A9llo'.
151 151 base_project_url = py3compat.unicode_to_str(base_project_url, 'ascii')
152 template_path = os.path.join(os.path.dirname(__file__), "templates")
152 template_path = settings_overrides.get("template_path", os.path.join(os.path.dirname(__file__), "templates"))
153 153 settings = dict(
154 154 # basics
155 155 base_project_url=base_project_url,
@@ -172,15 +172,12 class NotebookWebApplication(web.Application):
172 172 # IPython stuff
173 173 mathjax_url=ipython_app.mathjax_url,
174 174 config=ipython_app.config,
175 use_less=ipython_app.use_less
175 use_less=ipython_app.use_less,
176 jinja2_env=Environment(loader=FileSystemLoader(template_path))
176 177 )
177 178
178 179 # allow custom overrides for the tornado web app.
179 180 settings.update(settings_overrides)
180
181 # create a jinja2 environment using the template path and store it in settings
182 settings["jinja2_env"]=Environment(loader=FileSystemLoader(settings["template_path"]))
183
184 181 return settings
185 182
186 183 def init_handlers(self, settings):
General Comments 0
You need to be logged in to leave comments. Login now