from flask_wtf import FlaskForm
from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, \
    MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField
from wtforms.fields.html5 import DateField
from wtforms.validators import DataRequired


# Structure of the Login form
class LoginForm(Form):
    email = StringField('Email', [
        validators.DataRequired(message='Es necesario introducir un email')])
    password = PasswordField('Contraseña', [
        validators.DataRequired(message='Es necesario introducir una contraseña')])
    remember_me = BooleanField('Recuerdame')
    submit = SubmitField('Iniciar Sesión')

# Structure of the Register form
class RegisterForm(Form):
    name = StringField('Nombre', [
        validators.DataRequired(message='Es necesario introducir un nombre'),
        validators.Length(min=4, max=50, message='El tamaño máximo del nombre son 50 carácteres')])
    lastname = StringField('Apellidos', [
        validators.DataRequired(message='Es necesario introducir apellidos'),
        validators.Length(min=4, max=50, message='El tamaño máximo del nombre son 50 carácteres')])

    # username = StringField('Username', [
    #    validators.Length(min=4, max=25, message='El nombre de usuario debe tener entre 4 y 25 carácteres')])
    email = StringField('Email', [
        validators.DataRequired(message='Es necesario introducir un email'),
        validators.Length(min=1, max=50, message='El email no puede contener más de 50 carácteres')])
    password = PasswordField('Contraseña', [
        validators.DataRequired(message='Es necesario una contraseña'),
        validators.Length(min=8, message='La contraseña debe tener al menos 8 caracteres')
    ])
    confirm = PasswordField('Confirmar Contraseña', [
        validators.EqualTo('password', message='Las contraseñas no coinciden')
    ])

# Structure of the Login form
class RestorePasswordForm(Form):
    email = StringField('Email', [
        validators.DataRequired(message='Es necesario introducir un email')])
    submit = SubmitField("Correo de Recuperación")

class EditProfile(FlaskForm):
    name = StringField('Nombre', [
        validators.DataRequired(message='Es necesario introducir un nombre'),
        validators.Length(min=4, max=50, message='El tamaño máximo del nombre son 50 carácteres')])
    lastname = StringField('Apellidos', [
        validators.DataRequired(message='Es necesario introducir apellidos'),
        validators.Length(min=4, max=50, message='El tamaño máximo del nombre son 50 carácteres')])
    gender = RadioField('Género', choices = [('hombre','Hombre'),('mujer','Mujer')])
    submit = SubmitField('Guardar cambios')

class EditLocation(FlaskForm):
    lat = HiddenField('Latitud', [
        validators.DataRequired(message='No se ha podido obtener la nueva localización')
    ])
    lng = HiddenField('Longitud', [
        validators.DataRequired(message='No se ha podido obtener la nueva localización')
    ])
    submit = SubmitField('Establecer ubicación')

class EditPassword(FlaskForm):
    old = PasswordField('Contraseña Anterior', [
        validators.DataRequired(message='Es necesario introducir una contraseña')
    ])
    password = PasswordField('Eliga una contraseña', [
        validators.DataRequired(message='Es necesario introducir una contraseña'),
        validators.Length(min=8, message='La contraseña debe tener al menos 8 caracteres')
    ])
    confirm = PasswordField('Confirme la contraseña', [
        validators.EqualTo('password', message='Las contraseñas no coinciden')
    ])
    submit = SubmitField('Cambiar contraseña')

class EditEmail(FlaskForm):
    email = StringField('Correo electrónico', [
        validators.DataRequired(message='Es necesario introducir una dirección de correo'),
        validators.Length(min=1, max=50, message='El correo no puede contener más de 50 carácteres')])
    confirm = StringField('Confirmar correo electrónico', [
        validators.EqualTo('email', message='Los correos no coinciden')
    ])
    submit = SubmitField('Cambiar correo')

class EditPicture(FlaskForm):
    picture = FileField('Imagen de perfil')
    submit = SubmitField('Establecer imagen')
    delete = SubmitField('Eliminar imagen')

class DeleteAccount(FlaskForm):
    delete = SubmitField("Eliminar cuenta")

# Structure of the Subir Anuncio form
class SubirAnuncioForm(FlaskForm):
    # pictures = HiddenField("Imágenes")
    # mimes = HiddenField("Formatos de imagen")
    name = StringField('Nombre del producto', [
        validators.DataRequired(message='Es necesario introducir un nombre de producto'),
        validators.Length(min=1, max=50, message='El tamaño máximo del nombre del producto son 50 carácteres')])
    price = DecimalField('Precio (€)', [
        validators.DataRequired(message='Es necesario introducir un precio'),
        validators.NumberRange(min=0, max=1000000, message='El precio intoducido no es válido (de 0 € a 999.999,99 €)')])
    category = SelectField('Categoría', 
        choices = [ 
            ('Automoción', 'Automoción'),
            ('Informática', 'Informática'),
            ('Moda', 'Moda'),
            ('Deporte y ocio', 'Deporte y ocio'),
            ('Videojuegos', 'Videojuegos'),
            ('Libros y música', 'Libros y música'),
            ('Hogar y jardín', 'Hogar y jardín'),
            ('Foto y audio', 'Foto y audio')
        ], validators = [ 
            validators.DataRequired(message='Es necesario seleccionar una categoría') ])
    description = TextAreaField('Descripción', [
        validators.DataRequired(message='Es necesario escribir una descripción')])
    lat = HiddenField('Latitud')
    lng = HiddenField('Longitud')
    enddate = DateField('End', format = '%Y-%m-%d', description = 'Time that the event will occur',
        validators= [validators.Optional()] )
    submit = SubmitField('Publicar')


class ProductSearch(Form):
    categories = ['Automoción', 'Informática', 'Moda', 'Deporte y ocio', 'Videojuegos', 'Libros y música', 'Hogar y jardín', 'Foto y audio']
    category = SelectField('Categoría', 
        choices = [ 
            ('Automoción', 'Automoción'),
            ('Informática', 'Informática'),
            ('Moda', 'Moda'),
            ('Deporte y ocio', 'Deporte y ocio'),
            ('Videojuegos', 'Videojuegos'),
            ('Libros y música', 'Libros y música'),
            ('Hogar y jardín', 'Hogar y jardín'),
            ('Foto y audio', 'Foto y audio')
        ])
    estados = [('en venta', 'En Venta'), ('vendido', 'Vendido')]
    resultadosporpag = ['15', '30', '45', '60', '75', '90']
    ordenacionlist = [('published ASC', 'Fecha (Más viejos primero)'), ('published DESC', 'Fecha (Más nuevos primero)'), ('distance DESC', 'Distancia Descendente'), ('distance ASC', 'Distancia Ascendente'), ('price ASC', 'Precio Ascendente'), ('price DESC', 'Precio Descendente'), ('views DESC', 'Popularidad descendente')]
    status = SelectField('Estado',
            choices = [
                ('en venta','En Venta'),
                ('vendido','Vendido')
            ])
    keywords = StringField('Palabras Clave')
    minprice = StringField('Precio Mínimo')
    maxprice = StringField('Precio Máximo')
    minpublished = DateField('Start', format = '%Y-%m-%d', description = 'Time that the event will occur')
    maxpublished = DateField('Start', format = '%Y-%m-%d', description = 'Time that the event will occur')
    resultados = SelectField('Resultados Por Página',
            choices = [
                ('15', '15'),
                ('30', '30'),
                ('45', '45'),
                ('60', '60'),
                ('75', '75'),
                ('90', '90')
            ])
    ordenacion = SelectField('Ordenación de Resultados',
            choices = [
                ('published ASC', 'Fecha (Más viejos primero)'),
                ('published DESC', 'Fecha (Más nuevos primero)'),
                ('distance DESC', 'Distancia Descendente'),
                ('distance ASC', 'Distancia Ascendente'),
                ('price ASC', 'Precio Ascendente'),
                ('price DESC', 'Precio Descendente'),
                ('views DESC', 'Popularidad descendente')
            ])
    distancia = StringField('Distancia')
    submit = SubmitField('Buscar')

class Review(FlaskForm):
    stars = IntegerField('Puntuación', [
        validators.DataRequired(message='Es necesario introducir una puntuación entre 1 y 5'),
        validators.NumberRange(min=1, max=5, message='La puntuación debe ser de 1 a 5 estrellas')])
    comment = TextAreaField('Comentario', [
        validators.DataRequired(message='Es necesario escribir un comentario')])
    submit = SubmitField('Publicar Valoración')


class bidPlacementForm(FlaskForm):
    amount = StringField('Cantidad')
    submit = SubmitField('Realizar Puja')

class reportForm(Form):
    category = SelectField('Categoría', 
        choices = [ 
            ('Sospecha de fraude', 'Sospecha de fraude'),
            ('No acudió a la cita', 'No acudió a la cita'),
            ('Mal comportamiento', 'Mal comportamiento'),
            ('Artículo defectuoso', 'Artículo defectuoso'), 
            ('Otros', 'Otros')])
    description = TextAreaField('Descripción del informe', [
        validators.DataRequired(message='Es necesario escribir una descripción')])
    submit = SubmitField('Publicar Informe')

[((14, 18, 14, 44), 'wtforms.BooleanField', 'BooleanField', ({(14, 31, 14, 43): '"""Recuerdame"""'}, {}), "('Recuerdame')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((15, 13, 15, 43), 'wtforms.SubmitField', 'SubmitField', ({(15, 25, 15, 42): '"""Iniciar Sesión"""'}, {}), "('Iniciar Sesión')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((43, 13, 43, 51), 'wtforms.SubmitField', 'SubmitField', ({(43, 25, 43, 50): '"""Correo de Recuperación"""'}, {}), "('Correo de Recuperación')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((52, 13, 52, 85), 'wtforms.RadioField', 'RadioField', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((53, 13, 53, 43), 'wtforms.SubmitField', 'SubmitField', ({(53, 25, 53, 42): '"""Guardar cambios"""'}, {}), "('Guardar cambios')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((62, 13, 62, 49), 'wtforms.SubmitField', 'SubmitField', ({(62, 25, 62, 48): '"""Establecer ubicación"""'}, {}), "('Establecer ubicación')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((75, 13, 75, 47), 'wtforms.SubmitField', 'SubmitField', ({(75, 25, 75, 46): '"""Cambiar contraseña"""'}, {}), "('Cambiar contraseña')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((84, 13, 84, 42), 'wtforms.SubmitField', 'SubmitField', ({(84, 25, 84, 41): '"""Cambiar correo"""'}, {}), "('Cambiar correo')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((87, 14, 87, 43), 'wtforms.FileField', 'FileField', ({(87, 24, 87, 42): '"""Imagen de perfil"""'}, {}), "('Imagen de perfil')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((88, 13, 88, 45), 'wtforms.SubmitField', 'SubmitField', ({(88, 25, 88, 44): '"""Establecer imagen"""'}, {}), "('Establecer imagen')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((89, 13, 89, 43), 'wtforms.SubmitField', 'SubmitField', ({(89, 25, 89, 42): '"""Eliminar imagen"""'}, {}), "('Eliminar imagen')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((92, 13, 92, 43), 'wtforms.SubmitField', 'SubmitField', ({(92, 25, 92, 42): '"""Eliminar cuenta"""'}, {}), "('Eliminar cuenta')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((118, 10, 118, 32), 'wtforms.HiddenField', 'HiddenField', ({(118, 22, 118, 31): '"""Latitud"""'}, {}), "('Latitud')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((119, 10, 119, 33), 'wtforms.HiddenField', 'HiddenField', ({(119, 22, 119, 32): '"""Longitud"""'}, {}), "('Longitud')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((122, 13, 122, 36), 'wtforms.SubmitField', 'SubmitField', ({(122, 25, 122, 35): '"""Publicar"""'}, {}), "('Publicar')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((127, 15, 137, 10), 'wtforms.SelectField', 'SelectField', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((141, 13, 145, 14), 'wtforms.SelectField', 'SelectField', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((146, 15, 146, 44), 'wtforms.StringField', 'StringField', ({(146, 27, 146, 43): '"""Palabras Clave"""'}, {}), "('Palabras Clave')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((147, 15, 147, 44), 'wtforms.StringField', 'StringField', ({(147, 27, 147, 43): '"""Precio Mínimo"""'}, {}), "('Precio Mínimo')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((148, 15, 148, 44), 'wtforms.StringField', 'StringField', ({(148, 27, 148, 43): '"""Precio Máximo"""'}, {}), "('Precio Máximo')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((149, 19, 149, 106), 'wtforms.fields.html5.DateField', 'DateField', (), '', False, 'from wtforms.fields.html5 import DateField\n'), ((150, 19, 150, 106), 'wtforms.fields.html5.DateField', 'DateField', (), '', False, 'from wtforms.fields.html5 import DateField\n'), ((151, 17, 159, 14), 'wtforms.SelectField', 'SelectField', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((160, 17, 169, 14), 'wtforms.SelectField', 'SelectField', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((170, 16, 170, 40), 'wtforms.StringField', 'StringField', ({(170, 28, 170, 39): '"""Distancia"""'}, {}), "('Distancia')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((171, 13, 171, 34), 'wtforms.SubmitField', 'SubmitField', ({(171, 25, 171, 33): '"""Buscar"""'}, {}), "('Buscar')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((179, 13, 179, 48), 'wtforms.SubmitField', 'SubmitField', ({(179, 25, 179, 47): '"""Publicar Valoración"""'}, {}), "('Publicar Valoración')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((183, 13, 183, 36), 'wtforms.StringField', 'StringField', ({(183, 25, 183, 35): '"""Cantidad"""'}, {}), "('Cantidad')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((184, 13, 184, 41), 'wtforms.SubmitField', 'SubmitField', ({(184, 25, 184, 40): '"""Realizar Puja"""'}, {}), "('Realizar Puja')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((187, 15, 193, 32), 'wtforms.SelectField', 'SelectField', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((196, 13, 196, 44), 'wtforms.SubmitField', 'SubmitField', ({(196, 25, 196, 43): '"""Publicar Informe"""'}, {}), "('Publicar Informe')", False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((11, 8, 11, 75), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((13, 8, 13, 82), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((20, 8, 20, 76), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((21, 8, 21, 100), 'wtforms.validators.Length', 'validators.Length', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((23, 8, 23, 76), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((24, 8, 24, 100), 'wtforms.validators.Length', 'validators.Length', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((29, 8, 29, 75), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((30, 8, 30, 101), 'wtforms.validators.Length', 'validators.Length', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((32, 8, 32, 71), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((33, 8, 33, 91), 'wtforms.validators.Length', 'validators.Length', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((36, 8, 36, 79), 'wtforms.validators.EqualTo', 'validators.EqualTo', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((42, 8, 42, 75), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((47, 8, 47, 76), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((48, 8, 48, 100), 'wtforms.validators.Length', 'validators.Length', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((50, 8, 50, 76), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((51, 8, 51, 100), 'wtforms.validators.Length', 'validators.Length', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((57, 8, 57, 89), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((60, 8, 60, 89), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((66, 8, 66, 82), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((69, 8, 69, 82), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((70, 8, 70, 91), 'wtforms.validators.Length', 'validators.Length', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((73, 8, 73, 79), 'wtforms.validators.EqualTo', 'validators.EqualTo', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((79, 8, 79, 91), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((80, 8, 80, 102), 'wtforms.validators.Length', 'validators.Length', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((82, 8, 82, 71), 'wtforms.validators.EqualTo', 'validators.EqualTo', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((99, 8, 99, 88), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((100, 8, 100, 113), 'wtforms.validators.Length', 'validators.Length', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((102, 8, 102, 76), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((103, 8, 103, 124), 'wtforms.validators.NumberRange', 'validators.NumberRange', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((117, 8, 117, 81), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((175, 8, 175, 94), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((176, 8, 176, 98), 'wtforms.validators.NumberRange', 'validators.NumberRange', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((178, 8, 178, 78), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((195, 8, 195, 81), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((115, 12, 115, 86), 'wtforms.validators.DataRequired', 'validators.DataRequired', (), '', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n'), ((121, 21, 121, 42), 'wtforms.validators.Optional', 'validators.Optional', ({}, {}), '()', False, 'from wtforms import Form, StringField, PasswordField, BooleanField, SubmitField, IntegerField, validators, FileField, MultipleFileField, SelectField, RadioField, HiddenField, DecimalField, TextAreaField\n')]