From a420bfa7f03617a01d75c24a8a6874531c181bf5 Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 10 Feb 2026 20:15:29 +0000 Subject: [PATCH] fix: market URLs include post slug prefix Nav entries template now links to /// matching the events app calendar URL pattern. market_url_for() updated to accept post_slug parameter. Co-Authored-By: Claude Opus 4.6 --- shared/urls.py | 4 ++-- suma_browser/templates/_types/post/admin/_nav_entries.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/urls.py b/shared/urls.py index 25d58e6..f2e78a8 100644 --- a/shared/urls.py +++ b/shared/urls.py @@ -37,10 +37,10 @@ def events_url(path: str = "/") -> str: return app_url("events", path) -def market_url_for(market_slug: str, path: str = "/") -> str: +def market_url_for(post_slug: str, market_slug: str, path: str = "/") -> str: if not path.startswith("/"): path = "/" + path - return market_url(f"/{market_slug}{path}") + return market_url(f"/{post_slug}/{market_slug}{path}") def login_url(next_url: str = "") -> str: diff --git a/suma_browser/templates/_types/post/admin/_nav_entries.html b/suma_browser/templates/_types/post/admin/_nav_entries.html index 5d22e3c..2268243 100644 --- a/suma_browser/templates/_types/post/admin/_nav_entries.html +++ b/suma_browser/templates/_types/post/admin/_nav_entries.html @@ -41,7 +41,7 @@ {# Markets #} {% for m in markets %}
{{m.name}}