8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 01:16:27 +00:00

Del code mort

This commit is contained in:
Gabriel Detraz 2018-03-25 16:22:50 +02:00 committed by root
parent ce21f3a550
commit 81ec19ecce

View file

@ -459,14 +459,5 @@ def stats_droits(request):
for droit in ListRight.objects.all().select_related('group_ptr'):#.prefetch_related('group_ptr__user_set__revision_set'): for droit in ListRight.objects.all().select_related('group_ptr'):#.prefetch_related('group_ptr__user_set__revision_set'):
stats_list[droit]=droit.user_set.all().annotate(num=Count('revision'),last=Max('revision__date_created')) stats_list[droit]=droit.user_set.all().annotate(num=Count('revision'),last=Max('revision__date_created'))
# count,last=0,0
# for droit in ListRight.objects.all():
# for use in droit.user_set.all():
# countRevision.objects.filter(user=use).count()
# print(Revision.objects.order_by('date_created').last().date_created)
# stats_list[droit]=use.annotate(num=count,las)
#raise ValueError('temps='+str(time()-depart))
return render(request, 'logs/stats_droits.html', {'stats_list': stats_list}) return render(request, 'logs/stats_droits.html', {'stats_list': stats_list})