Formatted utils/forms.py
This commit is contained in:
parent
a37464f8b3
commit
083b870b33
1 changed files with 3 additions and 2 deletions
|
@ -5,11 +5,12 @@ from django.core.mail import EmailMultiAlternatives
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.contrib.auth import authenticate
|
from django.contrib.auth import authenticate
|
||||||
from membership.models import CustomUser
|
from membership.models import CustomUser
|
||||||
|
|
||||||
|
|
||||||
# from utils.fields import CountryField
|
# from utils.fields import CountryField
|
||||||
|
|
||||||
|
|
||||||
class SignupFormMixin(forms.ModelForm):
|
class SignupFormMixin(forms.ModelForm):
|
||||||
|
|
||||||
confirm_password = forms.CharField(widget=forms.PasswordInput())
|
confirm_password = forms.CharField(widget=forms.PasswordInput())
|
||||||
password = forms.CharField(widget=forms.PasswordInput())
|
password = forms.CharField(widget=forms.PasswordInput())
|
||||||
|
|
||||||
|
@ -87,7 +88,7 @@ class SetPasswordForm(forms.Form):
|
||||||
if password1 != password2:
|
if password1 != password2:
|
||||||
raise forms.ValidationError(
|
raise forms.ValidationError(
|
||||||
self.error_messages['password_mismatch'],
|
self.error_messages['password_mismatch'],
|
||||||
code='password_mismatch',)
|
code='password_mismatch', )
|
||||||
return password2
|
return password2
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue