mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-15 15:22:17 +00:00
Reworking of SSO app for CBVs
This commit is contained in:
@@ -111,6 +111,15 @@ class APIPasswordForm(forms.Form):
|
||||
""" API Password reset form """
|
||||
|
||||
password = forms.CharField(widget=forms.PasswordInput, label="Password")
|
||||
password2 = forms.CharField(widget=forms.PasswordInput, label="Confirm Password")
|
||||
|
||||
def clean_password2(self):
|
||||
password1 = self.cleaned_data.get('password')
|
||||
password2 = self.cleaned_data.get('password2')
|
||||
if password1 and password2:
|
||||
if password1 != password2:
|
||||
raise forms.ValidationError("The two passwords do not match.")
|
||||
return password2
|
||||
|
||||
|
||||
class EmailChangeForm(forms.Form):
|
||||
|
||||
Reference in New Issue
Block a user