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
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:
@@ -18,7 +18,7 @@ def register():
|
||||
@bp.get("/description/")
|
||||
@require_admin
|
||||
async def calendar_description_edit(calendar_slug: str, **kwargs):
|
||||
from sx.sx_components import render_calendar_description_edit
|
||||
from sxc.pages import render_calendar_description_edit
|
||||
html = await render_calendar_description_edit(g.calendar)
|
||||
return sx_response(html)
|
||||
|
||||
@@ -34,7 +34,7 @@ def register():
|
||||
g.calendar.description = description
|
||||
await g.s.flush()
|
||||
|
||||
from sx.sx_components import render_calendar_description
|
||||
from sxc.pages import render_calendar_description
|
||||
html = await render_calendar_description(g.calendar, oob=True)
|
||||
return sx_response(html)
|
||||
|
||||
@@ -42,7 +42,7 @@ def register():
|
||||
@bp.get("/description/view/")
|
||||
@require_admin
|
||||
async def calendar_description_view(calendar_slug: str, **kwargs):
|
||||
from sx.sx_components import render_calendar_description
|
||||
from sxc.pages import render_calendar_description
|
||||
html = await render_calendar_description(g.calendar)
|
||||
return sx_response(html)
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ def register():
|
||||
confirmed_entries = visible.confirmed_entries
|
||||
|
||||
from shared.sx.page import get_template_context
|
||||
from sx.sx_components import render_calendar_page, render_calendar_oob
|
||||
from sxc.pages import render_calendar_page, render_calendar_oob
|
||||
|
||||
tctx = await get_template_context()
|
||||
tctx.update(dict(
|
||||
@@ -199,7 +199,7 @@ def register():
|
||||
|
||||
await update_calendar_description(g.calendar, description)
|
||||
from shared.sx.page import get_template_context
|
||||
from sx.sx_components import _calendar_admin_main_panel_html
|
||||
from sxc.pages import _calendar_admin_main_panel_html
|
||||
ctx = await get_template_context()
|
||||
html = await _calendar_admin_main_panel_html(ctx)
|
||||
return sx_response(html)
|
||||
@@ -218,13 +218,13 @@ def register():
|
||||
# If we have post context (blog-embedded mode), update nav
|
||||
post_data = getattr(g, "post_data", None)
|
||||
from shared.sx.page import get_template_context
|
||||
from sx.sx_components import render_calendars_list_panel
|
||||
from sxc.pages import render_calendars_list_panel
|
||||
ctx = await get_template_context()
|
||||
html = await render_calendars_list_panel(ctx)
|
||||
|
||||
if post_data:
|
||||
from shared.services.entry_associations import get_associated_entries
|
||||
from sx.sx_components import render_post_nav_entries_oob
|
||||
from sxc.pages import render_post_nav_entries_oob
|
||||
|
||||
post_id = (post_data.get("post") or {}).get("id")
|
||||
cals = (
|
||||
|
||||
Reference in New Issue
Block a user