Decouple cross-app models: move canonical definitions to shared/models/

- Move 6 model files to shared/models/ (ghost_content, order, page_config,
  market, market_place, calendars) so apps import from shared, not each other
- Fix auth templates: replace url_for('auth.*') with coop_url() for
  cross-app compatibility
- Fix TYPE_CHECKING import in sumup.py to use shared.models.order
- Delete dead infrastructure/cart_loader.py (inverted dependency)
- Update models/__init__.py to export all new models

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-18 20:46:36 +00:00
parent da10fc4cf9
commit 0c0f3c8416
14 changed files with 1180 additions and 17 deletions

View File

@@ -1,11 +0,0 @@
from __future__ import annotations
from quart import g
async def load_cart():
# Lazy import: cart.bp.cart.services only exists in the cart app process.
# This avoids cross-app model conflicts at import time.
from cart.bp.cart.services import get_cart
g.cart = await get_cart(g.s)