from django.views.generic import ( ListView, DetailView ) from django.contrib.auth.mixins import LoginRequiredMixin class PollsListView(LoginRequiredMixin, ListView): model = Poll template_name = 'polls/index.html'