Commit 8cf1de4b authored by chirac's avatar chirac

Repare logs/stats

parent f01d7801
<ul class="pagination nav navbar-nav">
<li><a href="?onglet=1">1 mois</a></li>
<li><a href="?onglet=2">2 mois</a></li>
</ul>
{% for key_dict, stats_dict in stats_list.items %}
{% for key, stats in stats_dict.items %}
<table class="table table-striped">
......
......@@ -126,9 +126,9 @@ def stats_users(request):
start_date = timezone.now() + relativedelta(months=-search_field[1])
stats = {
'Utilisateur' : {
'Machines' : User.objects.filter(registered__gt=search_field[1]).annotate(num=Count('machine')).order_by('-num')[:10],
'Facture' : User.objects.filter(registered__gt=search_field[1]).annotate(num=Count('facture')).order_by('-num')[:10],
'Bannissement' : User.objects.filter(registered__gt=search_field[1]).annotate(num=Count('ban')).order_by('-num')[:10],
'Machines' : User.objects.annotate(num=Count('machine')).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],
'Accès gracieux' : User.objects.annotate(num=Count('whitelist')).order_by('-num')[:10],
'Droits' : User.objects.annotate(num=Count('right')).order_by('-num')[:10],
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment