From 27d8b3ddcd7397e5a23a44ae05e9913f28e9b48c Mon Sep 17 00:00:00 2001 From: karabalalala <167786634+karabalalala@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:41:38 +0100 Subject: [PATCH] changed homepage statistics to only account for active users ok --- apps/core/views/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/core/views/core.py b/apps/core/views/core.py index 9a9d8beb..d0bd6691 100644 --- a/apps/core/views/core.py +++ b/apps/core/views/core.py @@ -11,8 +11,8 @@ def index(request): - members = Profile.objects.count() - nationalities = Profile.objects.values("nationality").distinct().count() + members = Profile.objects.filter(user__is_active=True).count() + nationalities = Profile.objects.filter(user__is_active=True).values("nationality").distinct().count() active_years = int((datetime.date.today() - FOUNDING_DATE).days // 365.25) events_amount = "20+" partners = Partner.objects.all().order_by("?")