Template
Add shop, POS sync, event ticketing, and shipping catalog apps (#6)
## Summary - Closes #5 - Optional `shop`, `pos_sync`, `events`, and `shipping` apps gated by `FEATURE_*` flags - Deps match the catalog: shop/events need email + Stripe; POS/shipping need shop - Portal inventory, POS webhooks, capacity tickets, EasyPost/Pirate Ship shipping ## Test plan - [ ] `manage.py test` (152 passed locally) - [ ] Shop cart + paid order decrements stocked inventory - [ ] POS inbound webhook decrements SKU; paid order queues outbound reserve - [ ] Event capacity blocks overbook; paid order emails ticket codes - [ ] Shipping stub label + Pirate Ship CSV of unshipped paid orders - [ ] `validate-env.sh` rejects shop without email/payments, POS/shipping without shop Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
@@ -115,11 +115,27 @@ FEATURE_BLOG = env_bool("FEATURE_BLOG", _feature_default)
|
||||
FEATURE_PAYMENTS = env_bool("FEATURE_PAYMENTS", _feature_default)
|
||||
FEATURE_SOCIAL = env_bool("FEATURE_SOCIAL", _feature_default)
|
||||
FEATURE_SOCIAL_AI = env_bool("FEATURE_SOCIAL_AI", _feature_default)
|
||||
FEATURE_SHOP = env_bool("FEATURE_SHOP", _feature_default)
|
||||
FEATURE_POS_SYNC = env_bool("FEATURE_POS_SYNC", _feature_default)
|
||||
FEATURE_EVENTS = env_bool("FEATURE_EVENTS", _feature_default)
|
||||
FEATURE_SHIPPING = env_bool("FEATURE_SHIPPING", _feature_default)
|
||||
|
||||
if FEATURE_PAYMENTS and not FEATURE_EMAIL_SMS:
|
||||
raise ImproperlyConfigured("FEATURE_PAYMENTS requires FEATURE_EMAIL_SMS")
|
||||
if FEATURE_SOCIAL_AI and not FEATURE_SOCIAL:
|
||||
raise ImproperlyConfigured("FEATURE_SOCIAL_AI requires FEATURE_SOCIAL")
|
||||
if FEATURE_SHOP and not FEATURE_EMAIL_SMS:
|
||||
raise ImproperlyConfigured("FEATURE_SHOP requires FEATURE_EMAIL_SMS")
|
||||
if FEATURE_SHOP and not FEATURE_PAYMENTS:
|
||||
raise ImproperlyConfigured("FEATURE_SHOP requires FEATURE_PAYMENTS")
|
||||
if FEATURE_POS_SYNC and not FEATURE_SHOP:
|
||||
raise ImproperlyConfigured("FEATURE_POS_SYNC requires FEATURE_SHOP")
|
||||
if FEATURE_EVENTS and not FEATURE_EMAIL_SMS:
|
||||
raise ImproperlyConfigured("FEATURE_EVENTS requires FEATURE_EMAIL_SMS")
|
||||
if FEATURE_EVENTS and not FEATURE_PAYMENTS:
|
||||
raise ImproperlyConfigured("FEATURE_EVENTS requires FEATURE_PAYMENTS")
|
||||
if FEATURE_SHIPPING and not FEATURE_SHOP:
|
||||
raise ImproperlyConfigured("FEATURE_SHIPPING requires FEATURE_SHOP")
|
||||
|
||||
CORE_APPS = [
|
||||
"core.apps.CoreConfig",
|
||||
@@ -137,6 +153,10 @@ OPTIONAL_APPS = [
|
||||
(FEATURE_PAYMENTS, "payments.apps.PaymentsConfig"),
|
||||
(FEATURE_SOCIAL, "social.apps.SocialConfig"),
|
||||
(FEATURE_SOCIAL_AI, "social_ai.apps.SocialAiConfig"),
|
||||
(FEATURE_SHOP, "shop.apps.ShopConfig"),
|
||||
(FEATURE_POS_SYNC, "pos_sync.apps.PosSyncConfig"),
|
||||
(FEATURE_EVENTS, "events.apps.EventsConfig"),
|
||||
(FEATURE_SHIPPING, "shipping.apps.ShippingConfig"),
|
||||
]
|
||||
DJANGO_APPS = [
|
||||
"django.contrib.admin",
|
||||
@@ -352,6 +372,20 @@ STRIPE_PUBLISHABLE_KEY = env("STRIPE_PUBLISHABLE_KEY", "")
|
||||
STRIPE_WEBHOOK_SECRET = env("STRIPE_WEBHOOK_SECRET", "")
|
||||
STRIPE_CURRENCY = env("STRIPE_CURRENCY", "usd")
|
||||
|
||||
# --- Shop / POS / shipping (FEATURE_SHOP and add-ons) ---
|
||||
# 0 = unlimited made-to-order print queue.
|
||||
SHOP_PRINT_QUEUE_LIMIT_MINUTES = int(
|
||||
env("SHOP_PRINT_QUEUE_LIMIT_MINUTES", "0") or "0"
|
||||
)
|
||||
POS_WEBHOOK_SECRET = env("POS_WEBHOOK_SECRET", "")
|
||||
POS_API_BASE_URL = env("POS_API_BASE_URL", "")
|
||||
POS_API_TOKEN = env("POS_API_TOKEN", "")
|
||||
EASYPOST_API_KEY = env("EASYPOST_API_KEY", "")
|
||||
SHIP_FROM_LINE1 = env("SHIP_FROM_LINE1", "")
|
||||
SHIP_FROM_CITY = env("SHIP_FROM_CITY", "")
|
||||
SHIP_FROM_STATE = env("SHIP_FROM_STATE", "")
|
||||
SHIP_FROM_ZIP = env("SHIP_FROM_ZIP", "")
|
||||
|
||||
# --- Nominatim (address suggest; server-side proxy only) ---
|
||||
# Self-hosted on ai-server-4080. Nominatim has no native API keys — gate with
|
||||
# LAN UFW + this Django proxy. Optional NOMINATIM_API_KEY is forwarded as
|
||||
|
||||
Reference in New Issue
Block a user