From 9070029d31290c2462e016a971c79d66939d1f7e Mon Sep 17 00:00:00 2001 From: rob Date: Wed, 31 Dec 2025 20:06:34 -0400 Subject: [PATCH] Fix static folder path resolution for blueprints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use absolute paths for templates and static folders to ensure they resolve correctly regardless of the working directory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/smarttools/web/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/smarttools/web/__init__.py b/src/smarttools/web/__init__.py index 3011fc6..5550aae 100644 --- a/src/smarttools/web/__init__.py +++ b/src/smarttools/web/__init__.py @@ -1,11 +1,15 @@ """Web UI blueprint for SmartTools.""" +import os from flask import Blueprint +# Use absolute paths for templates and static folders +_pkg_dir = os.path.dirname(os.path.abspath(__file__)) + web_bp = Blueprint( "web", __name__, - template_folder="templates", - static_folder="static", + template_folder=os.path.join(_pkg_dir, "templates"), + static_folder=os.path.join(_pkg_dir, "static"), static_url_path="/static", )