From f9d063ba2c95fcb836437fbba60b2e5510e75d47 Mon Sep 17 00:00:00 2001 From: anoop Date: Thu, 4 Feb 2010 22:14:34 +0530 Subject: added views, templates for register, login, logout user. --- taskapp/forms/user.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'taskapp/forms/user.py') diff --git a/taskapp/forms/user.py b/taskapp/forms/user.py index e69de29..cca8173 100644 --- a/taskapp/forms/user.py +++ b/taskapp/forms/user.py @@ -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) -- cgit