mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
18 lines
605 B
Python
18 lines
605 B
Python
|
from flask_wtf import FlaskForm
|
||
|
from wtforms import StringField, PasswordField, SubmitField, BooleanField
|
||
|
from wtforms.validators import DataRequired, Length, Email, EqualTo
|
||
|
|
||
|
|
||
|
class RegistrationForm(FlaskForm):
|
||
|
email = StringField("Email",
|
||
|
validators=[DataRequired(), Email()])
|
||
|
admin = BooleanField("Admin")
|
||
|
submit = SubmitField("Sign Up")
|
||
|
|
||
|
|
||
|
class LoginForm(FlaskForm):
|
||
|
email = StringField("Email",
|
||
|
validators=[DataRequired(), Email()])
|
||
|
password = PasswordField("Password", validators=[DataRequired()])
|
||
|
submit = SubmitField("Login")
|