##// END OF EJS Templates
Add cwd to default templates search path.
Jonathan Frederic -
Show More
@@ -102,12 +102,14 b' class Exporter(Configurable):'
102 help="Extension of the file that should be written to disk"
102 help="Extension of the file that should be written to disk"
103 )
103 )
104
104
105 template_path = Unicode(
105 template_paths = List(['.'], config=True)
106 os.path.join("..", "templates"), config=True,
106
107 default_template_path = Unicode(
108 os.path.join("..", "templates"),
107 help="Path where the template files are located.")
109 help="Path where the template files are located.")
108
110
109 template_skeleton_path = Unicode(
111 template_skeleton_path = Unicode(
110 os.path.join("..", "templates", "skeleton"), config=True,
112 os.path.join("..", "templates", "skeleton"),
111 help="Path where the template skeleton files are located.")
113 help="Path where the template skeleton files are located.")
112
114
113 #Jinja block definitions
115 #Jinja block definitions
@@ -335,10 +337,10 b' class Exporter(Configurable):'
335 if extra_loaders:
337 if extra_loaders:
336 loaders.extend(extra_loaders)
338 loaders.extend(extra_loaders)
337
339
338 loaders.append(FileSystemLoader([
340 paths = self.template_paths
339 os.path.join(here, self.template_path),
341 paths.extend([os.path.join(here, self.default_template_path),
340 os.path.join(here, self.template_skeleton_path),
342 os.path.join(here, self.template_skeleton_path)])
341 ]))
343 loaders.append(FileSystemLoader(paths))
342
344
343 self.environment = Environment(
345 self.environment = Environment(
344 loader= ChoiceLoader(loaders),
346 loader= ChoiceLoader(loaders),
@@ -49,7 +49,7 b' class LatexExporter(Exporter):'
49 help="Name of the template file to use")
49 help="Name of the template file to use")
50
50
51 #Latex constants
51 #Latex constants
52 template_path = Unicode(
52 default_template_path = Unicode(
53 os.path.join("..", "templates", "latex"), config=True,
53 os.path.join("..", "templates", "latex"), config=True,
54 help="Path where the template files are located.")
54 help="Path where the template files are located.")
55
55
General Comments 0
You need to be logged in to leave comments. Login now