title: Converting a function based view to a class based view with only a form and no model (object)
body: <p>Right now, this is how the password is changed within a user profile. What is the best way of converting this to a class based view knowing that there is no model involved?</p>
  
  <p>This is the view for changing the password</p>
  
  <pre><code>@login_required
  def profile_change_password(request):
      """ 
      Change password of user.
      """
      user = get_object_or_404(User, username__iexact=request.user.username)
  
      if request.method == 'POST':
          form = PasswordChangeFormPrivate(user=user, data=request.POST)
          if form.is_valid():
              form.save()                       
              messages.add_message (request, messages.INFO, 
                                  _('password changed'))
              return HttpResponseRedirect(reverse('profile_view_details'))
      else:
          form = PasswordChangeFormPrivate(user=request.user)
  
      return render_to_response('profiles/profile_change_password.html',
                                { 'form': form,},
                                context_instance=RequestContext(request)
                               )
  </code></pre>
  
  <p>This is the form for changing the password</p>
  
  <pre><code>class PasswordChangeFormPrivate(PasswordChangeForm):
      def __init__(self, *args, **kwargs):
          super(PasswordChangeForm, self).__init__(*args, **kwargs)
  
      def clean_new_password2(self):
          password1 = self.cleaned_data.get('new_password1')
          password2 = self.cleaned_data.get('new_password2')
          if password1 and password2:
              if password1 != password2:
                  raise forms.ValidationError(_("The two password fields didn't match."))
  
          min_len = getattr(settings, "PASSWORD_MINIMUM_LENGHT", 6)
          if len(password1) &lt; min_len:
              raise forms.ValidationError(_("Password too short! minimum length is ")+" [%d]" % min_len)
  
          return password2
  </code></pre>
  
  <p>This is the URL</p>
  
  <pre><code>url(r'^password/change/$',
      profile_change_password,
      name='profile_change_password'
  ),
  </code></pre>
  
  <p>As you see no model is involved as the password will replace "User" password field up on validation. Any simple way of converting this to a class-based view? Does it matter?</p>