26 lines
1.1 KiB
Python
26 lines
1.1 KiB
Python
# -*- coding: UTF-8 -*-
|
|
"""
|
|
@Project : FlaskProject
|
|
@File : model.py
|
|
@IDE : PyCharm
|
|
@Author : 爱写屎山的王可奕
|
|
@Email : 1933658780@qq.com
|
|
@Date : 2023/4/28 10:01
|
|
@Comment : 存放各种类
|
|
"""
|
|
from flask_wtf import FlaskForm
|
|
from wtforms import StringField, SubmitField, PasswordField
|
|
from wtforms.validators import DataRequired
|
|
from werkzeug.security import generate_password_hash, check_password_hash
|
|
|
|
|
|
class LoginForm(FlaskForm):
|
|
account = StringField(label='account', validators=[DataRequired('用户名不能为空')],
|
|
render_kw={'class': "form-control", 'type': "text",
|
|
'id': "account", 'placeholder': "账号",
|
|
'required': ""})
|
|
password = PasswordField(label='password', validators=[DataRequired('密码不能为空')],
|
|
render_kw={'class': "form-control", 'type': "password", 'id': "password",
|
|
'placeholder': "密码", 'required': ""})
|
|
submit = SubmitField(label='login', render_kw={'class': "btn btn-primary d-block w-100", 'type': "submit"})
|