Phase 1-3 of decoupling:
- path_setup.py adds project root to sys.path
- Market-owned models in market/models/ (market, market_place)
- All imports updated: shared.infrastructure, shared.db, shared.browser, etc.
- MarketPlace uses container_type/container_id instead of post_id FK
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
market_url() generates URLs without the /<page_slug>/<market_slug>
prefix, causing 405 on POST /cart. url_for() auto-injects the slugs
via url_defaults.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The post header bar needs `post` in the template context to render
the page link, feature image, and nav. Added context processor to
spread g.post_data into templates, matching the events app pattern.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add post header row to market/index.html template chain
- Fix OOB templates to include post header on HTMX navigation
- Show market name instead of static coop_title in header
- Restore trailing slash on POST /cart/ route; fix templates to
include trailing slash in cart URLs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Templates generate URLs without trailing slash via market_url(), but
the route required one. POST requests don't get redirected by Werkzeug,
causing a 405 MethodNotAllowed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The market app doesn't have a cart blueprint registered, so url_for()
would fail. Uses the cross-app cart_url() helper instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Track which market a cart item came from by setting market_place_id
from g.market.id on new CartItem creation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The market blueprint already uses <slug> for product routes,
so the app-level prefix uses <page_slug> instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Market app now follows the events app pattern — URLs include
the post slug prefix (e.g. /market/suma-market/). Hydrate
loads both post and market, verifying market belongs to post.
Scraper default URLs updated accordingly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The url_prefix was being set both in register_market_bp() and
app.register_blueprint(), causing a SyntaxError from duplicate
route parameter.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Product routes import total() from cart.services — provide a minimal
copy so the market image can start independently.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split from coop monolith. Includes:
- Market/browse/product blueprints
- Product sync API
- Suma scraping pipeline
- Templates for market, browse, and product views
- Dockerfile and CI workflow for independent deployment