pytask/taskapp/forms/user.py
author nishanth
Sat, 30 Jan 2010 13:03:09 +0530
changeset 11 d28fcc644fbb
parent 6 94136f9a48bc
child 16 d57e63325759
permissions -rw-r--r--
implemented create task view which needed task.py in events. added a method show_msg to views/user.py and used it in logoff view.

#!/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)