generated from westfarn/web_django_template
Add shopper password reset and extend demo seed for accounts, reviews, and tracking.
CI / test (pull_request) Successful in 39s
CI / test (pull_request) Successful in 39s
Buyers can recover locked accounts, and seed_demo now walks the shopper path without live Stripe or EasyPost calls.
This commit is contained in:
@@ -19,5 +19,9 @@ class PortalStaffMiddleware:
|
||||
and getattr(user, "is_authenticated", False)
|
||||
and not getattr(user, "is_staff", False)
|
||||
):
|
||||
return redirect("account:home")
|
||||
from django.apps import apps
|
||||
|
||||
if apps.is_installed("shop"):
|
||||
return redirect("account:home")
|
||||
return redirect("public:home")
|
||||
return self.get_response(request)
|
||||
|
||||
Reference in New Issue
Block a user