

@login_required
def users(request):
    context = {
        
    }
    counts = {
        
    }
    for questions in Question.objects.all():
        email = questions.added_by.email
        if (email not in counts):
            counts[context] = 0
        counts[email] += 1
    for user in User.objects.all():
        if (user.email not in counts):
            counts[user.email] = 0
    context['counts'] = sorted(counts.items(), key=operator.itemgetter(0))
    context['counts'] = sorted(context['counts'], key=operator.itemgetter(1), reverse=True)
    return r2r(request, 'users', context)

dataset/ETHPy150Open dropbox/questions/questions/views.py users/VarMisuse@60/65 `email`->`context`