Phase 7: Replace render_template() with s-expression rendering in all POST/PUT/DELETE routes
Eliminates all render_template() calls from POST/PUT/DELETE handlers across all 7 services. Moves sexp_components.py into sexp/ packages per service. - Blog: like toggle, snippets, cache clear, features/sumup/entry panels, create/delete market, WYSIWYG editor panel (render_editor_panel) - Federation: like/unlike/boost/unboost, follow/unfollow, actor card, interaction buttons - Events: ticket widget, checkin, confirm/decline/provisional, tickets config, posts CRUD, description edit/save, calendar/slot/ticket_type CRUD, payments, buy tickets, day main panel, entry page - Market: like toggle, cart add response - Account: newsletter toggle - Cart: checkout error pages (3 handlers) - Orders: checkout error page (1 handler) Remaining render_template() calls are exclusively in GET handlers and internal services (email templates, fragment endpoints). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -83,9 +83,9 @@ async def get_template_context(**kwargs: Any) -> dict[str, Any]:
|
||||
ctx.update(rv)
|
||||
|
||||
# Inject Jinja globals that s-expression components need (URL helpers,
|
||||
# asset_url, site, etc.) — these aren't provided by context processors.
|
||||
# asset_url, styles, etc.) — these aren't provided by context processors.
|
||||
for key, val in current_app.jinja_env.globals.items():
|
||||
if key not in ctx and callable(val):
|
||||
if key not in ctx:
|
||||
ctx[key] = val
|
||||
|
||||
ctx.update(kwargs)
|
||||
|
||||
Reference in New Issue
Block a user