From 64f035ec4b9444e6d70997289ad9153bed99c3d1 Mon Sep 17 00:00:00 2001 From: chirac Date: Tue, 1 Nov 2016 03:46:01 +0100 Subject: [PATCH] Enlarge your kikimetre --- logs/views.py | 3 +++ users/models.py | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/logs/views.py b/logs/views.py index 9afac353..0acbf9a6 100644 --- a/logs/views.py +++ b/logs/views.py @@ -110,6 +110,9 @@ def stats_users(request): 'Facture' : User.objects.annotate(num=Count('facture')).order_by('-num')[:10], 'Bannissement' : User.objects.annotate(num=Count('ban')).order_by('-num')[:10], 'Accès gracieux' : User.objects.annotate(num=Count('whitelist')).order_by('-num')[:10], + 'Etablissements' : School.objects.annotate(num=Count('user')).order_by('-num')[:10], + 'Moyen de paiment' : Paiement.objects.annotate(num=Count('facture')).order_by('-num')[:10], + 'Banque' : Banque.objects.annotate(num=Count('facture')).order_by('-num')[:10], } return render(request, 'logs/stats_users.html', {'stats_list': stats}) diff --git a/users/models.py b/users/models.py index d61c2091..a95e2cb0 100644 --- a/users/models.py +++ b/users/models.py @@ -339,12 +339,12 @@ class Right(models.Model): @receiver(post_save, sender=Right) def right_post_save(sender, **kwargs): right = kwargs['instance'].right - right.ldap_sync() + #right.ldap_sync() @receiver(post_delete, sender=Right) def right_post_delete(sender, **kwargs): right = kwargs['instance'].right - right.ldap_sync() + #right.ldap_sync() class School(models.Model): PRETTY_NAME = "Etablissements enregistrés" @@ -383,12 +383,12 @@ class ListRight(models.Model): @receiver(post_save, sender=ListRight) def listright_post_save(sender, **kwargs): right = kwargs['instance'] - right.ldap_sync() + #right.ldap_sync() @receiver(post_delete, sender=ListRight) def listright_post_delete(sender, **kwargs): right = kwargs['instance'] - right.ldap_del() + #right.ldap_del() class ListShell(models.Model): PRETTY_NAME = "Liste des shells disponibles"