Files
@ e632d84d2215
Branch filter:
Location: symposion_app/symposion/forms.py - annotation
e632d84d2215
910 B
text/x-python
Merge pull request #105 from miurahr/drop-chosen
drop old unused chosen
drop old unused chosen
d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 36ab6d599ffc d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 36ab6d599ffc d31953b54450 d31953b54450 d31953b54450 d31953b54450 d31953b54450 36ab6d599ffc 36ab6d599ffc d31953b54450 | from django import forms
import account.forms
class SignupForm(account.forms.SignupForm):
first_name = forms.CharField()
last_name = forms.CharField()
email_confirm = forms.EmailField(label="Confirm Email")
def __init__(self, *args, **kwargs):
super(SignupForm, self).__init__(*args, **kwargs)
del self.fields["username"]
self.fields.keyOrder = [
"email",
"email_confirm",
"first_name",
"last_name",
"password",
"password_confirm"
]
def clean_email_confirm(self):
email = self.cleaned_data.get("email")
email_confirm = self.cleaned_data["email_confirm"]
if email:
if email != email_confirm:
raise forms.ValidationError(
"Email address must match previously typed email address")
return email_confirm
|