title: Updating User Password in Django with Class Based Views
body: <p>I'm tring write a view to administrator update a password of another user, using Class Based Views and model SetPasswordForm of Django.</p>
  
  <p>My views.py</p>
  
  <pre><code>class UserSetPasswordUpdateView(GroupRequiredMixin, FormView):
      form_class = forms.SetPasswordForm
      model =  User
      template_name = 'app/admin/object_update.html'
      success_url = reverse_lazy('portal:admin_user')
      group_required = u"Administrator"
  
      def get_form_kwargs(self):
          kwargs = super(UserSetPasswordUpdateView, self).get_form_kwargs()
          kwargs['user'] = User.objects.filter(pk=self.kwargs['pk'])
          return kwargs
  
  update_change_password = UserSetPasswordUpdateView.as_view()
  </code></pre>
  
  <p>My urls.py</p>
  
  <pre><code>url(r'^app/admin/update-user-pass/(?P&lt;pk&gt;[0-9]+)$', update_views.update_change_password, name='update_change_password'),
  </code></pre>
  
  <p>And don't show any errors, just go to <code>success_url</code>, but the password don't updated.</p>