123456789101112131415161718192021222324 |
- from flask_wtf import FlaskForm
- from wtforms import StringField, PasswordField, SubmitField, BooleanField, IntegerField, DateTimeField, SelectField
- from wtforms.validators import DataRequired, Length, EqualTo, Email, ValidationError
- import datetime
- class PlayerPointsForm(FlaskForm):
- # total = StringField("TotalPoints", validators = [DataRequired(), Length(min=2, max=20)])
- player1 = StringField("Player 1", validators=[DataRequired(), Length(min=0, max=20)])
- player2 = StringField("Player 2", validators=[DataRequired(), Length(min=0, max=20)])
- player3 = StringField("Player 3", validators=[DataRequired(), Length(min=0, max=20)])
- player4 = StringField("Player 4", validators=[DataRequired(), Length(min=0, max=20)])
- player5 = StringField("Player 5", validators=[DataRequired(), Length(min=0, max=20)])
- points_submit = SubmitField("Add Points")
- def validate_points(self, rfid_tag):
- return True
- class LoginForm(FlaskForm):
- username = StringField("username", validators=[DataRequired()])
- password = PasswordField("password", validators=[DataRequired()])
|