diff --git a/src/rookify/modules/module.py b/src/rookify/modules/module.py index 1de3997..a02e743 100644 --- a/src/rookify/modules/module.py +++ b/src/rookify/modules/module.py @@ -213,7 +213,12 @@ def execute(self) -> None: pass def load_template(self, filename: str, **variables: Any) -> __Template: - template_path = os.path.join(os.path.dirname(__file__), "templates", filename) + template_path = os.path.join( + os.path.dirname(__file__), + self.__class__.__module__.rsplit(".", 2)[1], + "templates", + filename, + ) template = ModuleHandler.__Template(template_path) template.render(**variables) return template