Replace sx_call() with render_to_sx() across all services
Python no longer generates s-expression strings. All SX rendering now goes through render_to_sx() which builds AST from native Python values and evaluates via async_eval_to_sx() — no SX string literals in Python. - Add render_to_sx()/render_to_html() infrastructure in shared/sx/helpers.py - Add (abort status msg) IO primitive in shared/sx/primitives_io.py - Convert all 9 services: ~650 sx_call() invocations replaced - Convert shared helpers (root_header_sx, full_page_sx, etc.) to async - Fix likes service import bug (likes.models → models) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -92,14 +92,14 @@ def create_ap_social_blueprint(app_name: str) -> Blueprint:
|
||||
kw = {"actor": actor}
|
||||
|
||||
if is_htmx_request():
|
||||
oob_headers = _social_oob_headers(tctx, **kw)
|
||||
return sx_response(oob_page_sx(
|
||||
oob_headers = await _social_oob_headers(tctx, **kw)
|
||||
return sx_response(await oob_page_sx(
|
||||
oobs=oob_headers,
|
||||
content=content,
|
||||
))
|
||||
else:
|
||||
header_rows = _social_full_headers(tctx, **kw)
|
||||
return full_page_sx(tctx, header_rows=header_rows, content=content)
|
||||
header_rows = await _social_full_headers(tctx, **kw)
|
||||
return await full_page_sx(tctx, header_rows=header_rows, content=content)
|
||||
|
||||
# -- Index ----------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user