This commit is contained in:
Faheedkhan 2025-06-29 10:12:34 +03:00
parent 1e7ed1f88d
commit 28f62ae55a
2 changed files with 4 additions and 1 deletions

View File

@ -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")

View File

@ -1,5 +1,5 @@
{% load i18n static %}
<div class="d-flex justify-content-between align-items-center mt-4">
<div class="d-flex justify-content-between align-items-center mt-4 mb-3">
<div class="text-body-secondary">
{{ _("Showing") }} {{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}
{{ _("of") }} {{ page_obj.paginator.count }} {{ _("results") }}