diff --git a/cara/apps/calculator/__init__.py b/cara/apps/calculator/__init__.py index 407382e3..c5b50385 100644 --- a/cara/apps/calculator/__init__.py +++ b/cara/apps/calculator/__init__.py @@ -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, diff --git a/cara/apps/calculator/__main__.py b/cara/apps/calculator/__main__.py index 7ec61206..7ec8b69a 100644 --- a/cara/apps/calculator/__main__.py +++ b/cara/apps/calculator/__main__.py @@ -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() diff --git a/cara/apps/calculator/templates/base/calculator.form.html.j2 b/cara/apps/templates/base/calculator.form.html.j2 similarity index 100% rename from cara/apps/calculator/templates/base/calculator.form.html.j2 rename to cara/apps/templates/base/calculator.form.html.j2 diff --git a/cara/apps/calculator/templates/base/calculator.report.html.j2 b/cara/apps/templates/base/calculator.report.html.j2 similarity index 100% rename from cara/apps/calculator/templates/base/calculator.report.html.j2 rename to cara/apps/templates/base/calculator.report.html.j2 diff --git a/cara/apps/calculator/templates/base/userguide.html.j2 b/cara/apps/templates/base/userguide.html.j2 similarity index 100% rename from cara/apps/calculator/templates/base/userguide.html.j2 rename to cara/apps/templates/base/userguide.html.j2 diff --git a/cara/apps/calculator/templates/calculator.form.html.j2 b/cara/apps/templates/calculator.form.html.j2 similarity index 100% rename from cara/apps/calculator/templates/calculator.form.html.j2 rename to cara/apps/templates/calculator.form.html.j2 diff --git a/cara/apps/calculator/templates/calculator.report.html.j2 b/cara/apps/templates/calculator.report.html.j2 similarity index 100% rename from cara/apps/calculator/templates/calculator.report.html.j2 rename to cara/apps/templates/calculator.report.html.j2 diff --git a/cara/apps/themes/cern/templates/calculator.form.html.j2 b/cara/apps/templates/cern/calculator.form.html.j2 similarity index 100% rename from cara/apps/themes/cern/templates/calculator.form.html.j2 rename to cara/apps/templates/cern/calculator.form.html.j2 diff --git a/cara/apps/themes/cern/templates/calculator.report.html.j2 b/cara/apps/templates/cern/calculator.report.html.j2 similarity index 100% rename from cara/apps/themes/cern/templates/calculator.report.html.j2 rename to cara/apps/templates/cern/calculator.report.html.j2 diff --git a/cara/apps/themes/cern/templates/index.html.j2 b/cara/apps/templates/cern/index.html.j2 similarity index 100% rename from cara/apps/themes/cern/templates/index.html.j2 rename to cara/apps/templates/cern/index.html.j2 diff --git a/cara/apps/themes/cern/templates/layout.html.j2 b/cara/apps/templates/cern/layout.html.j2 similarity index 100% rename from cara/apps/themes/cern/templates/layout.html.j2 rename to cara/apps/templates/cern/layout.html.j2 diff --git a/cara/apps/themes/cern/templates/userguide.html.j2 b/cara/apps/templates/cern/userguide.html.j2 similarity index 100% rename from cara/apps/themes/cern/templates/userguide.html.j2 rename to cara/apps/templates/cern/userguide.html.j2 diff --git a/cara/apps/calculator/templates/userguide.html.j2 b/cara/apps/templates/userguide.html.j2 similarity index 100% rename from cara/apps/calculator/templates/userguide.html.j2 rename to cara/apps/templates/userguide.html.j2