Stand up Print Forge as a 3D-printed toy shop with color variants and printer photography.

Replaces the client_site template branding, adds shop/shipping, and points beta CI at master for easy deploy.

Closes #1
This commit is contained in:
2026-09-06 08:28:04 -05:00
parent 8a97e3fbe2
commit b2029b6c0f
336 changed files with 9241 additions and 2537 deletions
+16
View File
@@ -34,6 +34,20 @@ def site_branding(request):
}
def shop_cart(request):
from django.apps import apps as django_apps
if not django_apps.is_installed("shop"):
return {"cart_count": 0}
session = getattr(request, "session", None)
if session is None:
return {"cart_count": 0}
from shop.services import cart_lines
lines = cart_lines(session)
return {"cart_count": sum(line["quantity"] for line in lines)}
def tianji_tracking(request):
match = getattr(request, "resolver_match", None)
url_name = getattr(match, "url_name", "") or ""
@@ -63,6 +77,8 @@ def tianji_tracking(request):
nav_section = "social_accounts"
elif namespace == "social":
nav_section = "social"
elif namespace == "shop":
nav_section = "shop"
return {
"tianji_enabled": getattr(settings, "TIANJI_ENABLED", False)