-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathforms.py
More file actions
77 lines (69 loc) · 2.08 KB
/
forms.py
File metadata and controls
77 lines (69 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
from django import forms
from captcha.fields import CaptchaField
class UserForm(forms.Form):
username = forms.CharField(
# label="用户名",
max_length=128,
widget=forms.TextInput(
attrs={
'class': 'form-control',
'placeholder': 'Username',
'autofocus': ''})
)
password = forms.CharField(
# label="密码",
max_length=256,
widget=forms.PasswordInput(
attrs={
'class': 'form-control',
'placeholder': "Password"
}
)
)
captcha = CaptchaField()
class RegisterForm(forms.Form):
username = forms.CharField(
label="用户名",
max_length=128,
widget=forms.TextInput(
attrs={
'class': 'form-control'
}
)
)
password1 = forms.CharField(
label="密码",
max_length=256,
widget=forms.PasswordInput(
attrs={
'class': 'form-control'
}
)
)
password2 = forms.CharField(
label="确认密码",
max_length=256,
widget=forms.PasswordInput(
attrs={
'class': 'form-control'
}
)
)
email = forms.EmailField(
label="邮箱地址",
widget=forms.EmailInput(
attrs={
'class': 'form-control'
}
)
)
captcha = CaptchaField(label="验证码")
class ForgetIndexForm(forms.Form):
email = forms.EmailField(label="邮箱地址", widget=forms.EmailInput(attrs={'class': 'form-control'}))
captcha = CaptchaField(label="验证码")
class ForgetChangeForm(forms.Form):
password1 = forms.CharField(label="密码", max_length=256, widget=forms.PasswordInput(attrs={'class': 'form-control'}))
password2 = forms.CharField(label="确认密码", max_length=256,
widget=forms.PasswordInput(attrs={'class': 'form-control'}))
code = forms.CharField(max_length=256)
captcha = CaptchaField(label="验证码")