From 28f62ae55a30b0975eb379c15c17fb2d955407f1 Mon Sep 17 00:00:00 2001 From: Faheedkhan Date: Sun, 29 Jun 2025 10:12:34 +0300 Subject: [PATCH] update --- inventory/middleware.py | 3 +++ templates/partials/pagination.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/inventory/middleware.py b/inventory/middleware.py index 52dae133..d25c70f3 100644 --- a/inventory/middleware.py +++ b/inventory/middleware.py @@ -122,6 +122,8 @@ class DealerSlugMiddleware: return response def process_view(self, request, view_func, view_args, view_kwargs): + if 'signup' in request.path: + return redirect("account_signup") if not request.user.is_authenticated: return None if request.path.startswith('/en/ledger/') or request.path.startswith('/ar/ledger/'): @@ -131,3 +133,4 @@ class DealerSlugMiddleware: dealer = get_user_type(request) if view_kwargs["dealer_slug"] != dealer.slug: raise Http404("Dealer slug mismatch") + \ No newline at end of file diff --git a/templates/partials/pagination.html b/templates/partials/pagination.html index a3b89dbc..0efee150 100644 --- a/templates/partials/pagination.html +++ b/templates/partials/pagination.html @@ -1,5 +1,5 @@ {% load i18n static %} -
+
{{ _("Showing") }} {{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }} {{ _("of") }} {{ page_obj.paginator.count }} {{ _("results") }}