fix: register cart loader so g.cart is available for product cart route
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 35s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 35s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
3
app.py
3
app.py
@@ -8,6 +8,7 @@ from jinja2 import FileSystemLoader, ChoiceLoader
|
|||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
|
|
||||||
from shared.factory import create_base_app
|
from shared.factory import create_base_app
|
||||||
|
from shared.cart_loader import load_cart
|
||||||
from config import config
|
from config import config
|
||||||
|
|
||||||
from suma_browser.app.bp import register_market_bp
|
from suma_browser.app.bp import register_market_bp
|
||||||
@@ -45,7 +46,7 @@ def create_app() -> "Quart":
|
|||||||
from models.market_place import MarketPlace
|
from models.market_place import MarketPlace
|
||||||
from models.ghost_content import Post
|
from models.ghost_content import Post
|
||||||
|
|
||||||
app = create_base_app("market", context_fn=market_context)
|
app = create_base_app("market", context_fn=market_context, before_request_fns=[load_cart])
|
||||||
|
|
||||||
# App-specific templates override shared templates
|
# App-specific templates override shared templates
|
||||||
app_templates = str(Path(__file__).resolve().parent / "templates")
|
app_templates = str(Path(__file__).resolve().parent / "templates")
|
||||||
|
|||||||
Reference in New Issue
Block a user