Browse Source

Add email state statistics

release-2.9
Jean-Romain Garnier 6 years ago
committed by Gabriel Detraz
parent
commit
23a5bd05e7
  1. 18
      logs/views.py

18
logs/views.py

@ -284,6 +284,24 @@ def stats_general(request):
_all_whitelisted.exclude(adherent__isnull=True).count(), _all_whitelisted.exclude(adherent__isnull=True).count(),
_all_whitelisted.exclude(club__isnull=True).count(), _all_whitelisted.exclude(club__isnull=True).count(),
], ],
"email_state_verified_users": [
_("Users with a verified email"),
User.objects.filter(email_state=User.EMAIL_STATE_VERIFIED).count(),
Adherent.objects.filter(email_state=User.EMAIL_STATE_VERIFIED).count(),
Club.objects.filter(email_state=User.EMAIL_STATE_VERIFIED).count(),
],
"email_state_unverified_users": [
_("Users with an unverified email"),
User.objects.filter(email_state=User.EMAIL_STATE_UNVERIFIED).count(),
Adherent.objects.filter(email_state=User.EMAIL_STATE_UNVERIFIED).count(),
Club.objects.filter(email_state=User.EMAIL_STATE_UNVERIFIED).count(),
],
"email_state_pending_users": [
_("Users pending email confirmation"),
User.objects.filter(email_state=User.EMAIL_STATE_PENDING).count(),
Adherent.objects.filter(email_state=User.EMAIL_STATE_PENDING).count(),
Club.objects.filter(email_state=User.EMAIL_STATE_PENDING).count(),
],
"actives_interfaces": [ "actives_interfaces": [
_("Active interfaces (with access to the network)"), _("Active interfaces (with access to the network)"),
_all_active_interfaces_count.count(), _all_active_interfaces_count.count(),

Loading…
Cancel
Save