Нет описания

1234567891011121314151617181920
  1. # -*- encoding: utf-8 -*-
  2. """
  3. License: MIT
  4. Copyright (c) 2019 - present AppSeed.us
  5. """
  6. from flask_wtf import FlaskForm
  7. from wtforms import TextField, PasswordField
  8. from wtforms.validators import InputRequired, Email, DataRequired
  9. ## login and registration
  10. class LoginForm(FlaskForm):
  11. username = TextField ('Username', id='username_login' , validators=[DataRequired()])
  12. password = PasswordField('Password', id='pwd_login' , validators=[DataRequired()])
  13. class CreateAccountForm(FlaskForm):
  14. username = TextField('Username' , id='username_create' , validators=[DataRequired()])
  15. email = TextField('Email' , id='email_create' , validators=[DataRequired(), Email()])
  16. password = PasswordField('Password' , id='pwd_create' , validators=[DataRequired()])