title: Authentication for class based views in Django
body: <pre><code>class AdminView(generic.ListView):
      model = get_user_model()
      fields = ['first_name', 'username', 'is_active']
      template_name = 'users/admin.html'
  
  class AdminUpdateView(UpdateView):
      model = get_user_model()
      fields = ['is_active']
      template_name = 'users/user_update.html'
      success_url = reverse_lazy('users:admin')
  </code></pre>
  
  <p>There are two views in django which I have created and I want them to be accessed only when the admin/staff logins. How do I go about it?</p>