6
|
1 |
#!/usr/bin/python2.5
|
|
2 |
|
|
3 |
from django import forms
|
|
4 |
from pytask.taskapp.models import GENDER_CHOICES
|
|
5 |
|
|
6 |
class RegistrationForm(forms.Form):
|
|
7 |
username = forms.CharField(max_length=30, required=True)
|
|
8 |
password = forms.CharField(max_length=60, required=True, widget=forms.PasswordInput)
|
|
9 |
repeat_password = forms.CharField(max_length=60, required=True, widget=forms.PasswordInput)
|
|
10 |
email = forms.EmailField(max_length=30, required=True)
|
|
11 |
gender = forms.ChoiceField(choices=GENDER_CHOICES, required = True)
|
|
12 |
dob = forms.DateField(required=True, help_text = "(YYYY-MM-DD)")
|
|
13 |
|
|
14 |
class LoginForm(forms.Form):
|
|
15 |
username = forms.CharField(max_length=30, required=True)
|
|
16 |
password = forms.CharField(max_length=60, required=True, widget=forms.PasswordInput)
|