Remove render_to_sx from public API: enforce sx_call for all service code
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m44s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m44s
Replace ~250 render_to_sx calls across all services with sync sx_call, converting many async functions to sync where no other awaits remained. Make render_to_sx/render_to_sx_with_env private (_render_to_sx). Add (post-header-ctx) IO primitive and shared post/post-admin defmacros. Convert built-in post/post-admin layouts from Python to register_sx_layout with .sx defcomps. Remove dead post_admin_mobile_nav_sx. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -259,7 +259,7 @@ def register():
|
||||
}
|
||||
|
||||
from sxc.pages.renders import render_day_main_panel
|
||||
html = await render_day_main_panel(ctx)
|
||||
html = render_day_main_panel(ctx)
|
||||
mini_html = await fetch_fragment("cart", "cart-mini", params=frag_params, required=False)
|
||||
return sx_response(html + (mini_html or ""))
|
||||
|
||||
@@ -280,12 +280,12 @@ def register():
|
||||
day_slots = list(result.scalars())
|
||||
|
||||
from sxc.pages.entries import render_entry_add_form
|
||||
return sx_response(await render_entry_add_form(g.calendar, day, month, year, day_slots))
|
||||
return sx_response(render_entry_add_form(g.calendar, day, month, year, day_slots))
|
||||
|
||||
@bp.get("/add-button/")
|
||||
async def add_button(day: int, month: int, year: int, **kwargs):
|
||||
from sxc.pages.entries import render_entry_add_button
|
||||
return sx_response(await render_entry_add_button(g.calendar, day, month, year))
|
||||
return sx_response(render_entry_add_button(g.calendar, day, month, year))
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user