Delete events sx_components.py — move all rendering to sxc/pages
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 49s

Phase 7 of the zero-Python-rendering plan. All 100 rendering functions
move from events/sx/sx_components.py into events/sxc/pages/__init__.py.
Route handlers (15 files) import from sxc.pages instead.
load_service_components call moves into _load_events_page_files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 11:16:59 +00:00
parent 31a8b755d9
commit 7419ecf3c0
18 changed files with 3242 additions and 3328 deletions

View File

@@ -47,7 +47,7 @@ def register() -> Blueprint:
entries, has_more, pending_tickets = await _load_entries(post["id"], page)
from shared.sx.page import get_template_context
from sx.sx_components import render_page_summary_page, render_page_summary_oob
from sxc.pages import render_page_summary_page, render_page_summary_oob
ctx = await get_template_context()
if is_htmx_request():
@@ -65,7 +65,7 @@ def register() -> Blueprint:
entries, has_more, pending_tickets = await _load_entries(post["id"], page)
from sx.sx_components import render_page_summary_cards
from sxc.pages import render_page_summary_cards
sx_src = await render_page_summary_cards(entries, has_more, pending_tickets, {}, page, view, post)
return sx_response(sx_src)
@@ -106,7 +106,7 @@ def register() -> Blueprint:
if ident["session_id"] is not None:
frag_params["session_id"] = ident["session_id"]
from sx.sx_components import render_ticket_widget
from sxc.pages import render_ticket_widget
widget_html = await render_ticket_widget(entry, qty, f"/{g.post_slug}/tickets/adjust")
mini_html = await fetch_fragment("cart", "cart-mini", params=frag_params, required=False)
return sx_response(widget_html + (mini_html or ""))