Fix load_service_components path for sx, market, events
The load_service_components call used dirname twice from
sxc/pages/__init__.py, yielding {service}/sxc/ instead of
{service}/. This meant {service}/sx/*.sx files (layouts, calendar
components, etc.) were never loaded into the component env.
- sx: ~sx-layout-full not found → Unknown component on client
- events: ~events-calendar-grid not found → Unknown component
- market: also fix url_for endpoint for defpage_market_admin
(mounted on app, not blueprint — no prefix needed)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,8 +26,9 @@ def _load_events_page_files() -> None:
|
||||
import os
|
||||
from shared.sx.pages import load_page_dir
|
||||
from shared.sx.jinja_bridge import load_service_components
|
||||
base = os.path.dirname(os.path.dirname(__file__))
|
||||
load_service_components(base, service_name="events")
|
||||
sxc_dir = os.path.dirname(os.path.dirname(__file__)) # events/sxc/
|
||||
service_root = os.path.dirname(sxc_dir) # events/
|
||||
load_service_components(service_root, service_name="events")
|
||||
load_page_dir(os.path.dirname(__file__), "events")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user