generated from westfarn/web_django_template
## Summary - Slim the public contact form to email, interest, and message. Name, phone, and address live on the customer profile instead. - Customers can register, sign in, save shipping details, and view order history. Logged-in checkout creates a Stripe Customer and saves cards on Stripe (`setup_future_usage`); we only store `stripe_customer_id`. - Shipment tracking: EasyPost tracker lookup + webhook, plus paste-in numbers from Pirate Ship/Shippo. Customers see carrier status on their orders; `dispatch_due` refreshes open shipments. - Product reviews (1–5) only after a paid/fulfilled purchase of that product. Fixes #7 ## Test plan - [ ] Contact form submits with only email + message; extra name/phone/address fields are ignored - [ ] Register, sign in, save profile (name/phone/shipping) - [ ] Guest checkout still works; after signup, prior orders with that email show in history - [ ] Logged-in checkout prefills shipping and does not collect card data locally - [ ] Portal: buy label or paste a Pirate Ship tracking number, confirm status/events; customer order page shows tracking - [ ] Product page: non-buyers cannot review; buyers can leave one 1–5 star review - [ ] Non-staff users hitting `/portal/` redirect to `/account/` Reviewed-on: #8
68 lines
2.4 KiB
Python
68 lines
2.4 KiB
Python
"""URL configuration. Optional apps are included only when installed."""
|
|
|
|
from django.apps import apps
|
|
from django.contrib import admin
|
|
from django.urls import include, path
|
|
|
|
from contacts.views import address_suggest
|
|
from core.views import campaign_short_link, healthz
|
|
|
|
urlpatterns = [
|
|
path("healthz/", healthz, name="healthz"),
|
|
path("api/address-suggest/", address_suggest, name="address_suggest"),
|
|
path("files/", include("core.urls")),
|
|
path("admin/", admin.site.urls),
|
|
path("accounts/", include("accounts.urls")),
|
|
path("portal/", include("dashboard.urls")),
|
|
path("portal/leads/", include("leads.urls")),
|
|
path("portal/contacts/", include("contacts.urls")),
|
|
path("portal/analytics/", include("analytics.urls")),
|
|
path("", include("public.urls")),
|
|
]
|
|
|
|
if apps.is_installed("email_sms"):
|
|
urlpatterns += [path("portal/messaging/", include("email_sms.urls"))]
|
|
if apps.is_installed("directmail"):
|
|
urlpatterns += [path("portal/direct-mail/", include("directmail.urls"))]
|
|
if apps.is_installed("email_sms") or apps.is_installed("directmail"):
|
|
urlpatterns += [
|
|
path(
|
|
"portal/campaigns/short-link/",
|
|
campaign_short_link,
|
|
name="campaign_short_link",
|
|
),
|
|
]
|
|
if apps.is_installed("blog"):
|
|
urlpatterns += [
|
|
path("blog/", include("blog.public_urls")),
|
|
path("portal/blog/", include("blog.portal_urls")),
|
|
]
|
|
if apps.is_installed("payments"):
|
|
urlpatterns += [
|
|
path("portal/payments/", include("payments.urls")),
|
|
path("pay/", include("payments.public_urls")),
|
|
]
|
|
if apps.is_installed("social"):
|
|
urlpatterns += [path("portal/social/", include("social.urls"))]
|
|
if apps.is_installed("social_ai"):
|
|
urlpatterns += [
|
|
path("portal/social/api/generate/", include("social_ai.urls")),
|
|
]
|
|
if apps.is_installed("shop"):
|
|
urlpatterns += [
|
|
path("account/", include("accounts.customer_urls")),
|
|
path("shop/", include("shop.public_urls")),
|
|
path("portal/shop/", include("shop.portal_urls")),
|
|
]
|
|
if apps.is_installed("pos_sync"):
|
|
urlpatterns += [path("portal/pos/", include("pos_sync.urls"))]
|
|
if apps.is_installed("events"):
|
|
urlpatterns += [
|
|
path("events/", include("events.public_urls")),
|
|
path("portal/events/", include("events.portal_urls")),
|
|
]
|
|
if apps.is_installed("shipping"):
|
|
urlpatterns += [path("portal/shipping/", include("shipping.urls"))]
|
|
|
|
handler404 = "public.views.page_not_found"
|