mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-30 08:32:26 +00:00
Enlarge your kikimetre
This commit is contained in:
parent
7cc3b5110a
commit
dff91125e7
2 changed files with 7 additions and 4 deletions
|
@ -110,6 +110,9 @@ def stats_users(request):
|
||||||
'Facture' : User.objects.annotate(num=Count('facture')).order_by('-num')[:10],
|
'Facture' : User.objects.annotate(num=Count('facture')).order_by('-num')[:10],
|
||||||
'Bannissement' : User.objects.annotate(num=Count('ban')).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],
|
'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})
|
return render(request, 'logs/stats_users.html', {'stats_list': stats})
|
||||||
|
|
||||||
|
|
|
@ -339,12 +339,12 @@ class Right(models.Model):
|
||||||
@receiver(post_save, sender=Right)
|
@receiver(post_save, sender=Right)
|
||||||
def right_post_save(sender, **kwargs):
|
def right_post_save(sender, **kwargs):
|
||||||
right = kwargs['instance'].right
|
right = kwargs['instance'].right
|
||||||
right.ldap_sync()
|
#right.ldap_sync()
|
||||||
|
|
||||||
@receiver(post_delete, sender=Right)
|
@receiver(post_delete, sender=Right)
|
||||||
def right_post_delete(sender, **kwargs):
|
def right_post_delete(sender, **kwargs):
|
||||||
right = kwargs['instance'].right
|
right = kwargs['instance'].right
|
||||||
right.ldap_sync()
|
#right.ldap_sync()
|
||||||
|
|
||||||
class School(models.Model):
|
class School(models.Model):
|
||||||
PRETTY_NAME = "Etablissements enregistrés"
|
PRETTY_NAME = "Etablissements enregistrés"
|
||||||
|
@ -383,12 +383,12 @@ class ListRight(models.Model):
|
||||||
@receiver(post_save, sender=ListRight)
|
@receiver(post_save, sender=ListRight)
|
||||||
def listright_post_save(sender, **kwargs):
|
def listright_post_save(sender, **kwargs):
|
||||||
right = kwargs['instance']
|
right = kwargs['instance']
|
||||||
right.ldap_sync()
|
#right.ldap_sync()
|
||||||
|
|
||||||
@receiver(post_delete, sender=ListRight)
|
@receiver(post_delete, sender=ListRight)
|
||||||
def listright_post_delete(sender, **kwargs):
|
def listright_post_delete(sender, **kwargs):
|
||||||
right = kwargs['instance']
|
right = kwargs['instance']
|
||||||
right.ldap_del()
|
#right.ldap_del()
|
||||||
|
|
||||||
class ListShell(models.Model):
|
class ListShell(models.Model):
|
||||||
PRETTY_NAME = "Liste des shells disponibles"
|
PRETTY_NAME = "Liste des shells disponibles"
|
||||||
|
|
Loading…
Reference in a new issue