reg/forms.py
changeset 17 125b6fc8f20b
parent 9 e29ecb7819e7
child 18 7dae32a2439b
--- a/reg/forms.py	Mon Apr 12 15:14:03 2010 +0530
+++ b/reg/forms.py	Mon Apr 12 16:17:53 2010 +0530
@@ -5,7 +5,7 @@
 from django.contrib.auth.models import User
 from django.contrib.auth import authenticate
 
-from workshop.reg.models import Profile, Event
+from workshop.reg.models import Profile, Event, GENDER_CHOICES, PROFESSION_CHOICES
 
 class LoginForm(forms.Form):
     """ a form to handle login.
@@ -157,3 +157,15 @@
         if not new_password == self.data['confirm_password']:
             raise forms.ValidationError("Passwords do not match")
 
+class EditProfileForm(forms.Form):
+    """ form for editing the profile.
+    """
+
+    first_name = forms.CharField(required=True)
+    last_name = forms.CharField(required=True)
+    gender = forms.ChoiceField(choices=GENDER_CHOICES)
+    profession = forms.ChoiceField(choices=PROFESSION_CHOICES)
+    affiliated_to = forms.CharField(max_length=100, required=True, label="College/Company")
+    interests = forms.CharField(max_length=100, label="Fields of interest")
+
+