fix: market URLs include post slug prefix

Nav entries template now links to /<post_slug>/<market_slug>/
matching the events app calendar URL pattern. market_url_for()
updated to accept post_slug parameter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-10 20:15:29 +00:00
parent 42f4a8b68f
commit a420bfa7f0
2 changed files with 3 additions and 3 deletions

View File

@@ -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:

View File

@@ -41,7 +41,7 @@
{# Markets #}
{% for m in markets %}
<a
href="{{ market_url('/' + m.slug + '/') }}"
href="{{ market_url('/' + post.slug + '/' + m.slug + '/') }}"
class="{{styles.nav_button_less_pad}}">
<i class="fa fa-shopping-bag" aria-hidden="true"></i>
<div>{{m.name}}</div>