Slim sxc/pages/__init__.py for federation, test, cart, blog

Move render functions, layouts, helpers, and utils from __init__.py
to sub-modules (renders.py, layouts.py, helpers.py, utils.py).
Update all bp route imports to point at sub-modules directly.
Each __init__.py is now ≤20 lines of setup + registration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 16:51:57 +00:00
parent 03d7b29745
commit 8eaf4026ab
22 changed files with 1668 additions and 1648 deletions

View File

@@ -33,7 +33,7 @@ async def _render_choose_username(*, actor=None, error="", username=""):
from shared.sx.helpers import render_to_sx
from shared.sx.parser import SxExpr
from shared.sx.page import get_template_context
from sxc.pages import _social_page
from sxc.pages.utils import _social_page
from markupsafe import escape
ctx = await get_template_context()