Merge branch 'macros'

# Conflicts:
#	blog/bp/post/admin/routes.py
#	events/sxc/pages/calendar.py
#	events/sxc/pages/entries.py
#	events/sxc/pages/slots.py
#	events/sxc/pages/tickets.py
This commit is contained in:
2026-03-05 16:40:06 +00:00
69 changed files with 18073 additions and 977 deletions

View File

@@ -15,7 +15,13 @@
:title (get __mctx "market-title")
:top-slug (get __mctx "top-slug")
:sub-div (get __mctx "sub-slug"))
:nav (get __mctx "desktop-nav")
:nav (~market-desktop-nav-from-data
:categories (get __mctx "categories")
:hx-select (get __mctx "hx-select")
:select-colours (get __mctx "select-colours")
:all-href (get __mctx "all-href")
:all-active (get __mctx "all-active")
:admin-href (get __mctx "admin-href"))
:child-id "market-header-child"
:oob (unquote oob)))))

View File

@@ -129,7 +129,7 @@ async def _h_page_admin_data(slug=None, **kw) -> dict:
m_name = getattr(m, "name", "") or (m.get("name", "") if isinstance(m, dict) else "")
href = prefix + f"/{post_slug}/{m_slug}/"
del_url = url_for("page_admin.delete_market", market_slug=m_slug)
csrf_hdr = f'{{"X-CSRFToken":"{csrf}"}}'
csrf_hdr = {"X-CSRFToken": csrf}
markets.append({
"href": href, "name": m_name, "slug": m_slug,
"del-url": del_url, "csrf-hdr": csrf_hdr,

View File

@@ -175,7 +175,7 @@ def render_like_toggle_button(slug: str, liked: bool, *,
return sx_call(
"market-like-toggle-button",
colour=colour, action=like_url,
hx_headers=f'{{"X-CSRFToken": "{csrf}"}}',
hx_headers={"X-CSRFToken": csrf},
label=label, icon_cls=icon,
)