add form
This commit is contained in:
parent
016188aeb7
commit
4c5cacd916
|
@ -1,7 +1,26 @@
|
||||||
from django import forms
|
from django import forms
|
||||||
from captcha.fields import CaptchaField
|
from captcha.fields import CaptchaField
|
||||||
|
from safesite import models as s_models
|
||||||
|
|
||||||
class GroupUserForm(forms.Form):
|
class GroupUserForm(forms.Form):
|
||||||
username = forms.CharField(label="用户名", max_length=128, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': "账户",'autofocus': ''}))
|
username = forms.CharField(label="用户名", max_length=128, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': "账户",'autofocus': ''}))
|
||||||
password = forms.CharField(label="密码", max_length=256, widget=forms.PasswordInput(attrs={'class': 'form-control','placeholder': "密码"}))
|
password = forms.CharField(label="密码", max_length=256, widget=forms.PasswordInput(attrs={'class': 'form-control','placeholder': "密码"}))
|
||||||
captcha = CaptchaField(label='验证码', error_messages={"invalid":"验证码错误"})
|
captcha = CaptchaField(label='验证码', error_messages={"invalid":"验证码错误"})
|
||||||
|
|
||||||
|
|
||||||
|
class UserForm(forms.Form):
|
||||||
|
mark = (
|
||||||
|
('1', "未删除"),
|
||||||
|
('0', "删除"),
|
||||||
|
)
|
||||||
|
username = forms.CharField(label="账号",max_length=30, widget=forms.TextInput())
|
||||||
|
name = forms.CharField(label="姓名", max_length=20, widget=forms.TextInput())
|
||||||
|
empid = forms.CharField(label="工号", max_length=20, widget=forms.TextInput())
|
||||||
|
password = forms.CharField(label="密码", max_length=256, widget=forms.PasswordInput())
|
||||||
|
ubelongpart = forms.ModelChoiceField(queryset=s_models.Partment.objects.all())
|
||||||
|
openid = forms.CharField(label="公众号openid", max_length=200, widget=forms.TextInput())
|
||||||
|
nickname = forms.CharField(label="昵称", max_length=200, widget=forms.TextInput())
|
||||||
|
mpopenid = forms.CharField(label="小程序openid", max_length=200, widget=forms.TextInput())
|
||||||
|
deletemark = forms.ChoiceField(label='删除标记', choices=mark)
|
||||||
|
headimgurl = forms.CharField(label="头像", max_length=200, required=False, widget=forms.TextInput())
|
||||||
|
usecomp = forms.ModelChoiceField(queryset=s_models.Partment.objects.all())#所属公司
|
||||||
|
|
Loading…
Reference in New Issue