generated from westfarn/web_django_template
Ship Print Forge shop site (colors, photos, 3D viewer) (#2)
## Summary - Rebrand the Django client template as Print Forge (`client_site` → `print_forge`) with shop + shipping enabled. - Product listings support multiple photos, color variants (shared price/description/STL, per-color stock and photos), and a photo-first / 3D-second gallery. - Public pages use 3D printer / printed-toy photography instead of leftover t-shirt mockups; beta CI deploys on `master`. Closes #1 Infra: [server-infra#27](ai_ml_operations/server-infra#27) (easy deploy beta). ## Test plan - [ ] Product page shows photo first, 3D model second; color swatches swap photos and stock - [ ] Portal can upload multiple photos and per-color qty/images; STL stays shared - [ ] Public home/about/gallery have no t-shirt mockups - [ ] `manage.py test` passes - [ ] After server-infra#27: beta deploy to `print-forge-preview.aimloperations.com` Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
+16
-1
@@ -29,7 +29,18 @@ def _public_site_base(request) -> str:
|
||||
|
||||
|
||||
def home(request):
|
||||
return render(request, "public/home.html")
|
||||
featured = []
|
||||
from django.apps import apps as django_apps
|
||||
|
||||
if django_apps.is_installed("shop"):
|
||||
from shop.models import Product
|
||||
|
||||
featured = list(
|
||||
Product.objects.filter(is_published=True)
|
||||
.select_related("image")
|
||||
.prefetch_related("colors")[:6]
|
||||
)
|
||||
return render(request, "public/home.html", {"featured_products": featured})
|
||||
|
||||
|
||||
def about(request):
|
||||
@@ -70,6 +81,10 @@ def sitemap_xml(request):
|
||||
from django.apps import apps as django_apps
|
||||
if django_apps.is_installed("blog"):
|
||||
paths.append(("blog:list", "0.7", "weekly"))
|
||||
if django_apps.is_installed("shop"):
|
||||
paths.append(("shop:list", "0.8", "weekly"))
|
||||
if django_apps.is_installed("events"):
|
||||
paths.append(("events:list", "0.8", "weekly"))
|
||||
urls = []
|
||||
for name, priority, changefreq in paths:
|
||||
path = reverse(name)
|
||||
|
||||
Reference in New Issue
Block a user