|
|
|
@ -1558,9 +1558,12 @@ class TemplateEngine:
|
|
|
|
|
|
|
|
|
|
if directory_path is not None:
|
|
|
|
|
self.environment = Environment(
|
|
|
|
|
loader=FileSystemLoader(directory_path))
|
|
|
|
|
loader=FileSystemLoader(directory_path),
|
|
|
|
|
trim_blocks=True,
|
|
|
|
|
lstrip_blocks=True)
|
|
|
|
|
else:
|
|
|
|
|
self.environment = Environment()
|
|
|
|
|
self.environment = Environment(trim_blocks=True,
|
|
|
|
|
lstrip_blocks=True)
|
|
|
|
|
|
|
|
|
|
self.environment.filters = CALCULATE_FILTERS
|
|
|
|
|
|
|
|
|
|