Maybe, to save time and code, you should use: 
`from django.views.generic import ListView
class ListChallenges(ListView):
   model = Challenge
   paginate_by = 50`