Delete orders + federation sx_components.py — rendering inlined to routes
Phase 2 (Orders): - Checkout error/return renders moved directly into route handlers - Removed orphaned test_sx_helpers.py Phase 3 (Federation): - Auth pages use _render_social_auth_page() helper in routes - Choose-username render inlined into identity routes - Timeline/search/follow/interaction renders inlined into social routes using serializers imported from sxc.pages - Added _social_page() to sxc/pages/__init__.py for shared use - Home page renders inline in app.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -70,9 +70,22 @@ def register() -> Blueprint:
|
||||
|
||||
if not hosted_url:
|
||||
from shared.sx.page import get_template_context
|
||||
from sx.sx_components import render_checkout_error_page
|
||||
from shared.sx.helpers import render_to_sx, root_header_sx, header_child_sx, full_page_sx, call_url
|
||||
from shared.sx.parser import SxExpr
|
||||
from shared.infrastructure.urls import cart_url
|
||||
tctx = await get_template_context()
|
||||
html = await render_checkout_error_page(tctx, error="No hosted checkout URL returned from SumUp when trying to reopen payment.", order=order)
|
||||
account_url = call_url(tctx, "account_url", "")
|
||||
auth_hdr = await render_to_sx("auth-header-row", account_url=account_url)
|
||||
hdr = "(<> " + await root_header_sx(tctx) + " " + await header_child_sx(auth_hdr) + ")"
|
||||
filt = await render_to_sx("checkout-error-header")
|
||||
order_sx = await render_to_sx("checkout-error-order-id", oid=f"#{order.id}")
|
||||
content = await render_to_sx(
|
||||
"checkout-error-content",
|
||||
msg="No hosted checkout URL returned from SumUp when trying to reopen payment.",
|
||||
order=SxExpr(order_sx),
|
||||
back_url=cart_url("/"),
|
||||
)
|
||||
html = await full_page_sx(tctx, header_rows=hdr, filter=filt, content=content)
|
||||
return await make_response(html, 500)
|
||||
|
||||
return redirect(hosted_url)
|
||||
|
||||
Reference in New Issue
Block a user