From d6519bde66920b908485786207fa8e3ae868560c Mon Sep 17 00:00:00 2001 From: rob Date: Wed, 31 Dec 2025 19:36:05 -0400 Subject: [PATCH] Fix blueprint route registration order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/smarttools/web/app.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/smarttools/web/app.py b/src/smarttools/web/app.py index 252390a..46cffe1 100644 --- a/src/smarttools/web/app.py +++ b/src/smarttools/web/app.py @@ -19,6 +19,9 @@ from .sessions import SQLiteSessionInterface, cleanup_expired_sessions def create_web_app() -> Flask: app = registry_app.create_app() + # Import routes BEFORE registering blueprint + from . import routes # noqa: F401 + app.register_blueprint(web_bp) # Session configuration @@ -47,10 +50,6 @@ def create_web_app() -> Flask: app.add_url_rule("/sitemap.xml", endpoint="web.sitemap", view_func=sitemap_response) app.add_url_rule("/robots.txt", endpoint="web.robots", view_func=robots_txt) - # Ensure routes are registered - from . import routes # noqa: F401 - - # Auth routes are registered via blueprint import side effects return app