text: from flask_wtf import FlaskForm
  from wtforms.validators import ValidationError, DataRequired, Email, EqualTo, URL
  from flask_wtf import FlaskForm
  from wtforms import StringField, PasswordField, BooleanField, SubmitField, HiddenField
  from flask_babel import _, lazy_gettext as _l
  from app.models import User
  from wtforms.fields.html5 import URLField, DateField
  
  
  class LoginForm(FlaskForm):
      username = StringField('Username', validators=[DataRequired()])
      password = PasswordField('Password', validators=[DataRequired()])
      submit = SubmitField('Login')
      remember_me = BooleanField('Remember Me')
  
  
  class RegistrationForm(FlaskForm):
      username = StringField(_l('Username'), validators=[DataRequired()])
      email = StringField(_l('Email'), validators=[DataRequired(), Email()])
      password = PasswordField(_l('Password'), validators=[DataRequired()])
      password2 = PasswordField(
          _l('Repeat Password'), validators=[DataRequired(),
                                             EqualTo('password')])
      submit = SubmitField(_l('Register'))
  
      def validate_username(self, username):
          user = User.query.filter_by(username=username.data).first()
          if user is not None:
              raise ValidationError(_('Please use a different username.'))
  
      def validate_email(self, email):
          user = User.query.filter_by(email=email.data).first()
          if user is not None:
              raise ValidationError(_('Please use a different email address.'))
  
  
  class ResetPasswordRequestForm(FlaskForm):
      email = StringField(_l('Email'), validators=[DataRequired(), Email()])
      submit = SubmitField(_l('Request Password Reset'))
  
  
  class ResetPasswordForm(FlaskForm):
      password = PasswordField(_l('Password'), validators=[DataRequired()])
      password2 = PasswordField(
          _l('Repeat Password'), validators=[DataRequired(),
                                             EqualTo('password')])
      submit = SubmitField(_l('Request Password Reset'))
  
  
  class DataVisualization(FlaskForm):
      website_name = HiddenField(_l('Enter File URL'))
      website_url = HiddenField(_l('Enter File URL'))
      timestamp = HiddenField(_l('Enter File URL'))
      submit = SubmitField(_l('Clean'))
  
  class PostForm(FlaskForm):
      url = URLField(_l('Enter URL of the website'),
                     validators=[DataRequired(),
                                 URL(message='Must be a valid URL')])
      web_name = StringField(_l('Enter website name'),
                             validators=[DataRequired()])
      submit = SubmitField(_l('Submit'))
  