husstanden/forms/login.py
2019-04-26 03:24:19 +01:00

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=4)
])
class User(UserMixin):
def __init__(self, uuid):
self.id = uuid
"""
self.name = name
self.email = email
self.password = password
"""