ClassyCBV doesn't contain everything in django, so that is probably related 
to your confusion.

In classycbv PasswordChangeView's attributes, you can see 
form_class = <class 'django.contrib.auth.forms.PasswordChangeForm'>
which is what is called in PCV's Post handler 
<http://ccbv.co.uk/projects/Django/2.1/django.contrib.auth.views/PasswordChangeView/#post>

Now, that form is defined here 
<https://github.com/django/django/blob/2.1/django/contrib/auth/forms.py#L342>, 
which inherits from SetPasswordForm 
<https://github.com/django/django/blob/2.1/django/contrib/auth/forms.py#L298>.  
There's two methods inside that class, save, and clean_new_password2 
<https://github.com/django/django/blob/2.1/django/contrib/auth/forms.py#L322-L339>

Since these forms inherit from forms.Form 
<https://github.com/django/django/blob/2.1/django/forms/forms.py#L183>, 
they all inherit is_valid, which has this comment:  
"""Return True if the form has no errors, or False otherwise."""
So, what you'll need to do is override that `is_valid` method in your 
custom Form class to do the work for you.



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f3380a52-2bdf-4bf3-bc9d-833cefe5d406%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to