25 lines
487 B
Python
25 lines
487 B
Python
|
from wtforms import Form, BooleanField, StringField, PasswordField, validators
|
||
|
from flask_login import UserMixin
|
||
|
|
||
|
class LoginForm(Form):
|
||
|
email = StringField("Email", [
|
||
|
validators.DataRequired(),
|
||
|
validators.Length(min=6, max=64)
|
||
|
])
|
||
|
|
||
|
password = PasswordField("Password", [
|
||
|
validators.DataRequired(),
|
||
|
validators.Length(min=6)
|
||
|
])
|
||
|
|
||
|
class User(UserMixin):
|
||
|
def __init__(self, uuid):
|
||
|
self.id = uuid
|
||
|
|
||
|
"""
|
||
|
self.name = name
|
||
|
self.email = email
|
||
|
self.password = password
|
||
|
"""
|
||
|
|