taskapp/forms/user.py
changeset 13 0fb64b24a1c9
parent 12 a93eebabfeb1
child 23 f33084ea1361
--- a/taskapp/forms/user.py	Thu Feb 04 22:12:48 2010 +0530
+++ b/taskapp/forms/user.py	Thu Feb 04 22:14:34 2010 +0530
@@ -0,0 +1,16 @@
+#!/usr/bin/python2.5
+
+from django import forms
+from pytask.taskapp.models import GENDER_CHOICES
+
+class RegistrationForm(forms.Form):
+    username = forms.CharField(max_length=30, required=True)
+    password = forms.CharField(max_length=60, required=True, widget=forms.PasswordInput)
+    repeat_password = forms.CharField(max_length=60, required=True, widget=forms.PasswordInput)
+    email = forms.EmailField(max_length=30, required=True)
+    gender = forms.ChoiceField(choices=GENDER_CHOICES, required = True)
+    dob = forms.DateField(required=True, help_text = "(YYYY-MM-DD)")
+
+class LoginForm(forms.Form):
+    username = forms.CharField(max_length=30, required=True)
+    password = forms.CharField(max_length=60, required=True, widget=forms.PasswordInput)