safesite/groups/forms.py

8 lines
505 B
Python

from django import forms
from captcha.fields import CaptchaField
class GroupsForm(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(label='验证码', error_messages={"invalid":"验证码错误"})