generated from westfarn/web_django_template
## 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
36 lines
780 B
Python
36 lines
780 B
Python
from core.registry import (
|
|
register_dashboard_collector,
|
|
register_dispatcher,
|
|
register_feature,
|
|
register_portal_nav,
|
|
)
|
|
|
|
|
|
def register() -> None:
|
|
register_feature("pos_sync")
|
|
register_portal_nav(
|
|
section="pos_sync",
|
|
label="POS sync",
|
|
url_name="pos_sync:event_list",
|
|
group="Retail",
|
|
order=40,
|
|
)
|
|
register_dashboard_collector(_dashboard)
|
|
register_dispatcher(_dispatch)
|
|
|
|
|
|
def _dashboard(request) -> dict:
|
|
from pos_sync.models import SyncEvent
|
|
|
|
return {
|
|
"pos_failed_syncs": SyncEvent.objects.filter(
|
|
status=SyncEvent.Status.FAILED
|
|
).count()
|
|
}
|
|
|
|
|
|
def _dispatch() -> int:
|
|
from pos_sync.services import dispatch_pending_outbound
|
|
|
|
return dispatch_pending_outbound()
|