Fix market and calendar URL routing
Market: blog links now use market_url('/{slug}/') instead of
events_url('/{slug}/markets/'), matching the market service's
actual route structure /<page_slug>/<market_slug>/.
Calendar: flatten route from /<slug>/calendars/<calendar_slug>/
to /<slug>/<calendar_slug>/ by changing the events app blueprint
prefix and moving listing routes to explicit /calendars/ paths.
Update all hardcoded calendar URL paths across blog and events
services (Python + Jinja templates).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,7 @@ def register():
|
||||
)
|
||||
for entry in entries:
|
||||
entry_path = (
|
||||
f"/{post_slug}/calendars/{entry.calendar_slug}/"
|
||||
f"/{post_slug}/{entry.calendar_slug}/"
|
||||
f"{entry.start_at.year}/{entry.start_at.month}/"
|
||||
f"{entry.start_at.day}/entries/{entry.id}/"
|
||||
)
|
||||
@@ -87,7 +87,7 @@ def register():
|
||||
g.s, container_type, container_id,
|
||||
)
|
||||
for cal in calendars:
|
||||
href = events_url(f"/{post_slug}/calendars/{cal.slug}/")
|
||||
href = events_url(f"/{post_slug}/{cal.slug}/")
|
||||
html_parts.append(render_sexp(
|
||||
'(~calendar-link-nav :href href :name name :nav-class nav-class)',
|
||||
href=href, name=cal.name, **{"nav-class": nav_class},
|
||||
|
||||
Reference in New Issue
Block a user