All theme files elevated to app directory.

This commit is contained in:
Luis Aleixo 2021-11-29 17:23:35 +01:00
parent 4ba16b91a6
commit de5b4f6ec4
13 changed files with 1 additions and 2 deletions

View file

@ -229,7 +229,7 @@ def make_app(
calculator_templates = Path(__file__).parent / "templates"
templates_directories = [cara_templates, calculator_templates]
if theme_dir:
templates_directories.insert(0, theme_dir / 'templates')
templates_directories.insert(0, theme_dir)
loader = jinja2.FileSystemLoader([str(path) for path in templates_directories])
template_environment = jinja2.Environment(
loader=loader,

View file

@ -36,7 +36,6 @@ def main():
if theme_dir is not None:
theme_dir = Path(theme_dir).absolute()
assert theme_dir.exists()
assert (theme_dir / 'templates').exists()
app = make_app(debug=args.no_debug, calculator_prefix=args.prefix, theme_dir=theme_dir)
app.listen(args.port)
IOLoop.instance().start()