Monorepo: consolidate 7 repos into one
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m5s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m5s
Combines shared, blog, market, cart, events, federation, and account into a single repository. Eliminates submodule sync, sibling model copying at build time, and per-app CI orchestration. Changes: - Remove per-app .git, .gitmodules, .gitea, submodule shared/ dirs - Remove stale sibling model copies from each app - Update all 6 Dockerfiles for monorepo build context (root = .) - Add build directives to docker-compose.yml - Add single .gitea/workflows/ci.yml with change detection - Add .dockerignore for monorepo build context - Create __init__.py for federation and account (cross-app imports)
This commit is contained in:
49
market/bp/market/routes.py
Normal file
49
market/bp/market/routes.py
Normal file
@@ -0,0 +1,49 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from quart import Blueprint, g, render_template, make_response, url_for
|
||||
|
||||
|
||||
from ..browse.routes import register as register_browse_bp
|
||||
|
||||
from .filters.qs import makeqs_factory
|
||||
from ..browse.services.nav import get_nav
|
||||
from ..api.routes import products_api
|
||||
from .admin.routes import register as register_admin
|
||||
|
||||
|
||||
|
||||
def register(url_prefix, title):
|
||||
bp = Blueprint("market", __name__, url_prefix)
|
||||
|
||||
@bp.before_request
|
||||
def route():
|
||||
g.makeqs_factory = makeqs_factory
|
||||
|
||||
|
||||
@bp.context_processor
|
||||
async def inject_root():
|
||||
market = getattr(g, "market", None)
|
||||
market_id = market.id if market else None
|
||||
post_data = getattr(g, "post_data", None) or {}
|
||||
return {
|
||||
**post_data,
|
||||
"market_title": market.name if market else title,
|
||||
"categories": (await get_nav(g.s, market_id=market_id))["cats"],
|
||||
"qs": makeqs_factory()(),
|
||||
"market": market,
|
||||
}
|
||||
|
||||
bp.register_blueprint(
|
||||
register_browse_bp(),
|
||||
)
|
||||
bp.register_blueprint(
|
||||
products_api,
|
||||
)
|
||||
bp.register_blueprint(
|
||||
register_admin(),
|
||||
)
|
||||
|
||||
|
||||
|
||||
return bp
|
||||
|
||||
Reference in New Issue
Block a user