summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhu Ramachandran2011-11-10 16:34:17 +0530
committerPrabhu Ramachandran2011-11-10 16:34:17 +0530
commit30f005126c97121548cc1d453997933482bd33a8 (patch)
tree3e7b0c029b9fa0b0724fce0abc3d2503a883d2b7
parentd5cd760142772eb91d3c9ce01b3ae8ea86d160da (diff)
downloadonline_test-30f005126c97121548cc1d453997933482bd33a8.tar.gz
online_test-30f005126c97121548cc1d453997933482bd33a8.tar.bz2
online_test-30f005126c97121548cc1d453997933482bd33a8.zip
ENH: Adding email address to registration form.
-rw-r--r--exam/forms.py2
-rw-r--r--exam/views.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/exam/forms.py b/exam/forms.py
index bd5732e..164e334 100644
--- a/exam/forms.py
+++ b/exam/forms.py
@@ -6,7 +6,7 @@ class UserRegisterForm(forms.ModelForm):
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
roll_number = forms.CharField(max_length=30)
- #email_address = forms.EmailField()
+ email_address = forms.EmailField()
#password = forms.CharField(max_length=30, widget=forms.PasswordInput())
class Meta:
diff --git a/exam/views.py b/exam/views.py
index a4c611d..05fe792 100644
--- a/exam/views.py
+++ b/exam/views.py
@@ -39,6 +39,7 @@ def index(request):
new_user.first_name = data['first_name']
new_user.last_name = data['last_name']
+ new_user.email = data['email_address']
new_user.save()
new_profile = Profile(user=new_user)