8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

Enlarge your kikimetre

This commit is contained in:
chirac 2016-11-01 03:46:01 +01:00
parent 826d700478
commit 64f035ec4b
2 changed files with 7 additions and 4 deletions

View file

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

View file

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