summaryrefslogtreecommitdiffstats
path: root/forms.py
diff options
context:
space:
mode:
authorGeorg2021-09-01 12:55:44 +0200
committerGeorg2021-09-01 12:55:44 +0200
commitd2e8fcd2b5949c7836feaf559cd65c5062a7748c (patch)
treea46305087626f5362e4719f255f296e77056b010 /forms.py
downloadwebreg-d2e8fcd2b5949c7836feaf559cd65c5062a7748c.tar.gz
webreg-d2e8fcd2b5949c7836feaf559cd65c5062a7748c.tar.bz2
webreg-d2e8fcd2b5949c7836feaf559cd65c5062a7748c.zip
Init + SSO registration
Signed-off-by: Georg <georg@lysergic.dev>
Diffstat (limited to 'forms.py')
-rw-r--r--forms.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/forms.py b/forms.py
new file mode 100644
index 0000000..6e55f64
--- /dev/null
+++ b/forms.py
@@ -0,0 +1,16 @@
+from flask_wtf import FlaskForm
+from wtforms import StringField, PasswordField, SubmitField
+from wtforms.validators import DataRequired, Length, EqualTo, Email
+
+
+class RegistrationForm(FlaskForm):
+ username = StringField('Username', validators=[DataRequired(), Length(min=1, max=32)])
+ email = StringField('Email', validators=[DataRequired(), Email()])
+ password = PasswordField('Password', validators=[DataRequired()])
+ confirm_password = PasswordField('Confirm Password', validators=[DataRequired(), EqualTo('password')])
+ submit = SubmitField('Register')
+
+#class VerificationForm(FlaskForm):
+# username = StringField('Username', validators=[DataRequired(), Length(min=1, max=32)])
+# verif_code = StringField('Verification Code', validators=[DataRequired()])
+# submit = SubmitField('Verify')