feat: add markets and payments management pages
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 45s

- New markets blueprint at /<slug>/markets/ with create/delete
- New payments blueprint at /<slug>/payments/ with SumUp config
- Register both in events app with context processor for markets
- Remove PageConfig feature flag check from calendar creation
  (feature toggles replaced by direct management pages)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-10 23:45:07 +00:00
parent 0255c937dd
commit e0679f8100
20 changed files with 502 additions and 8 deletions

View File

@@ -5,7 +5,6 @@ from sqlalchemy.ext.asyncio import AsyncSession
from models.calendars import Calendar
from models.ghost_content import Post # for FK existence checks
from models.page_config import PageConfig
import unicodedata
import re
@@ -88,12 +87,6 @@ async def create_calendar(sess: AsyncSession, post_id: int, name: str) -> Calend
if not post.is_page:
raise CalendarError("Calendars can only be created on pages, not posts.")
pc = (await sess.execute(
select(PageConfig).where(PageConfig.post_id == post_id)
)).scalar_one_or_none()
if pc is None or not (pc.features or {}).get("calendar"):
raise CalendarError("Calendar feature is not enabled for this page. Enable it in page settings first.")
# Look for existing (including soft-deleted)
q = await sess.execute(
select(Calendar).where(Calendar.post_id == post_id, Calendar.name == name)