text: from flask_wtf import FlaskForm
  from wtforms import StringField,PasswordField,BooleanField,SubmitField
  from wtforms.validators import DataRequired,Email,EqualTo
  from ..models import User
  from wtforms import ValidationError
  
  class LoginForm(FlaskForm):
      email = StringField('Your Email Address',validators=[DataRequired(),Email()])
      password = PasswordField('Password',validators =[DataRequired()])
      remember = BooleanField('Remember me')
      submit = SubmitField('Sign In')
  
  class RegistrationForm(FlaskForm):
      email = StringField('Your Email Address',validators=[DataRequired(),Email()])
      username = StringField('Enter your username',validators = [DataRequired()])
      password = PasswordField('Password',validators = [DataRequired(),
      EqualTo('password2',message = 'Passwords must be identical')])
      password2 = PasswordField('Confirm Passwords',validators = [DataRequired()])
      submit = SubmitField('Sign Up')
  
  
      def validate_email(self,data_field):
          if User.query.filter_by(email =data_field.data).first():
              raise ValidationError('There is an account with that email')
  
      def validate_username(self,data_field):
          if User.query.filter_by(username = data_field.data).first():
              raise ValidationError('That username is taken')
  