Migrate all apps to defpage declarative page routes
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m41s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m41s
Replace Python GET page handlers with declarative defpage definitions in .sx files across all 8 apps (sx docs, orders, account, market, cart, federation, events, blog). Each app now has sxc/pages/ with setup functions, layout registrations, page helpers, and .sx defpage declarations. Core infrastructure: add g I/O primitive, PageDef support for auth/layout/ data/content/filter/aside/menu slots, post_author auth level, and custom layout registration. Remove ~1400 lines of render_*_page/render_*_oob boilerplate. Update all endpoint references in routes, sx_components, and templates to defpage_* naming. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!-- Desktop nav -->
|
||||
{% import 'macros/links.html' as links %}
|
||||
{% call links.link(
|
||||
url_for('calendar.slots.get', calendar_slug=calendar.slug),
|
||||
url_for('calendar.slots.defpage_slots_listing', calendar_slug=calendar.slug),
|
||||
hx_select_search,
|
||||
select_colours,
|
||||
True,
|
||||
@@ -14,5 +14,5 @@
|
||||
{% endcall %}
|
||||
{% if g.rights.admin %}
|
||||
{% from 'macros/admin_nav.html' import admin_nav_item %}
|
||||
{{ admin_nav_item(url_for('calendar.admin.admin', calendar_slug=calendar.slug)) }}
|
||||
{{ admin_nav_item(url_for('calendar.admin.defpage_calendar_admin', calendar_slug=calendar.slug)) }}
|
||||
{% endif %}
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="text-xs font-medium">
|
||||
{% call links.link(
|
||||
url_for(
|
||||
'calendar.slots.slot.get',
|
||||
'calendar.slots.slot.defpage_slot_detail',
|
||||
calendar_slug=calendar.slug,
|
||||
slot_id=entry.slot.id
|
||||
),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% import 'macros/links.html' as links %}
|
||||
{% macro header_row(oob=False) %}
|
||||
{% call links.menu_row(id='markets-row', oob=oob) %}
|
||||
{% call links.link(url_for('markets.home'), hx_select_search) %}
|
||||
{% call links.link(url_for('markets.defpage_events_markets'), hx_select_search) %}
|
||||
<i class="fa fa-shopping-bag" aria-hidden="true"></i>
|
||||
<div>
|
||||
Markets
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<a
|
||||
class="relative inline-flex items-center justify-center text-emerald-700"
|
||||
href="{{ url_for('tickets.my_tickets') }}"
|
||||
href="{{ url_for('tickets.defpage_my_tickets') }}"
|
||||
>
|
||||
<span class="relative inline-flex items-center justify-center">
|
||||
<i class="fa-solid fa-shopping-cart text-2xl" aria-hidden="true"></i>
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
<a
|
||||
class="relative inline-flex items-center justify-center text-emerald-700"
|
||||
href="{{ url_for('tickets.my_tickets') }}"
|
||||
href="{{ url_for('tickets.defpage_my_tickets') }}"
|
||||
>
|
||||
<span class="relative inline-flex items-center justify-center">
|
||||
<i class="fa-solid fa-shopping-cart text-2xl" aria-hidden="true"></i>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="space-y-2 mb-4">
|
||||
{% for ticket in created_tickets %}
|
||||
<a
|
||||
href="{{ url_for('tickets.ticket_detail', code=ticket.code) }}"
|
||||
href="{{ url_for('tickets.defpage_ticket_detail', code=ticket.code) }}"
|
||||
class="flex items-center justify-between p-2 rounded-lg bg-white border border-emerald-100 hover:border-emerald-300 transition text-sm"
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
<div class="mt-3 flex gap-2">
|
||||
<a
|
||||
href="{{ url_for('tickets.my_tickets') }}"
|
||||
href="{{ url_for('tickets.defpage_my_tickets') }}"
|
||||
class="text-sm text-emerald-700 hover:text-emerald-900 underline"
|
||||
>
|
||||
View all my tickets
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<section id="ticket-detail" class="{{styles.list_container}} max-w-lg mx-auto">
|
||||
|
||||
{# Back link #}
|
||||
<a href="{{ url_for('tickets.my_tickets') }}"
|
||||
<a href="{{ url_for('tickets.defpage_my_tickets') }}"
|
||||
class="inline-flex items-center gap-1 text-sm text-stone-500 hover:text-stone-700 mb-4">
|
||||
<i class="fa fa-arrow-left" aria-hidden="true"></i>
|
||||
Back to my tickets
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="space-y-4">
|
||||
{% for ticket in tickets %}
|
||||
<a
|
||||
href="{{ url_for('tickets.ticket_detail', code=ticket.code) }}"
|
||||
href="{{ url_for('tickets.defpage_ticket_detail', code=ticket.code) }}"
|
||||
class="block rounded-xl border border-stone-200 bg-white p-4 hover:shadow-md transition"
|
||||
>
|
||||
<div class="flex items-start justify-between gap-4">
|
||||
|
||||
Reference in New Issue
Block a user