diff --git a/changedetectionio/flask_app.py b/changedetectionio/flask_app.py index 3d6b0f23..35799c42 100644 --- a/changedetectionio/flask_app.py +++ b/changedetectionio/flask_app.py @@ -813,7 +813,9 @@ def changedetection_app(config=None, datastore_o=None): # So that the extra panels can access _helpers.html etc, we set the environment to load from templates/ # And then render the code from the module from jinja2 import Environment, FileSystemLoader - env = Environment(loader=FileSystemLoader('templates')) + import importlib.resources + templates_dir = str(importlib.resources.files("changedetectionio").joinpath('templates')) + env = Environment(loader=FileSystemLoader(templates_dir)) template = env.from_string(form.extra_form_content()) included_content = template.render(**template_args)