old_contents: # -*- coding: utf-8 -*-
  from django.contrib.auth.decorators import user_passes_test
  from django.shortcuts import render
  from django.views.generic import ListView
  from django.contrib.auth.models import User
  
  from levels.models import Score, Attempt
  
  # score can be accessed by anyone
  class ScoreList(ListView):
  #    queryset = User.objects.filter(is_superuser=False).filter(is_staff=False)
      model = User
      template_name = 'stats/score_list.html'
      ordering = ['-userprofile.get_score', '-userprofile.latest_correct_answer']
  
  
  # attemps should only be visible to superusers
  @user_passes_test(lambda u: u.is_superuser)
  def attempts(request, getnum=None):
      if getnum == None:
          getnum = 25
      context = {}
      context['getnum'] = getnum
      context['attempts'] = Attempt.objects.order_by('-pk')[:getnum]
      return render(request, "stats/attempts.html", context)
  
new_contents: # -*- coding: utf-8 -*-
  from django.contrib.auth.decorators import user_passes_test
  from django.shortcuts import render
  from django.views.generic import ListView
  from django.contrib.auth.models import User
  
  from levels.models import Score, Attempt
  
  # score can be accessed by anyone
  class ScoreList(ListView):
  #    queryset = User.objects.filter(is_superuser=False).filter(is_staff=False)
      model = User
      template_name = 'stats/score_list.html'
  
  
  # attemps should only be visible to superusers
  @user_passes_test(lambda u: u.is_superuser)
  def attempts(request, getnum=None):
      if getnum == None:
          getnum = 25
      context = {}
      context['getnum'] = getnum
      context['attempts'] = Attempt.objects.order_by('-pk')[:getnum]
      return render(request, "stats/attempts.html", context)
  
subject: add untested removal of ordering