<commit_before>from flask.ext.wtf import Form, TextField, HiddenField, ValidationError,\
                          Required, validators, FileField, BooleanField
from datamart import models, db
from wtforms.ext.sqlalchemy.orm import model_form
from secure_redirect import RedirectForm

class ExampleForm(RedirectForm):
    field1 = TextField('First Field', description='This is field one.')
    field2 = TextField('Second Field', description='This is field two.',
                       validators=[Required()])
    hidden_field = HiddenField('You cannot see this', description='Nope')

    def validate_hidden_field(form, field):
        raise ValidationError('Always wrong')

class FileUploadForm(RedirectForm):
    header_row = BooleanField('Is the first column header names?')
    data_file = FileField()

DimensionForm = model_form(models.Dimension, db_session=db.session,
                           base_class=RedirectForm, exclude = ['variables'])

VariableForm = model_form(models.Variable, db_session=db.session, base_class=RedirectForm, 
                         field_args = {
                             'roles': {
                                 'get_label': 'name'
                             },
                             'dimension': {
                                 'get_label': 'name'
                             }
                         })

RoleForm = model_form(models.Role, db_session=db.session, base_class=RedirectForm)

EventForm = model_form(models.Event, db_session=db.session, base_class=RedirectForm)

UserForm = model_form(models.User, db_session=db.session, base_class=RedirectForm,
                     exclude = ['confirmed_at',
                                'last_login_at',<commit_msg>Removed the ExampleForm.<commit_after>from flask.ext.wtf import Form, TextField, HiddenField, ValidationError,\
                          Required, validators, FileField, BooleanField
from datamart import models, db
from wtforms.ext.sqlalchemy.orm import model_form
from secure_redirect import RedirectForm

class FileUploadForm(RedirectForm):
    header_row = BooleanField('Is the first column header names?')
    data_file = FileField()

DimensionForm = model_form(models.Dimension, db_session=db.session,
                           base_class=RedirectForm, exclude = ['variables'])

VariableForm = model_form(models.Variable, db_session=db.session, base_class=RedirectForm, 
                         field_args = {
                             'roles': {
                                 'get_label': 'name'
                             },
                             'dimension': {
                                 'get_label': 'name'
                             }
                         })

RoleForm = model_form(models.Role, db_session=db.session, base_class=RedirectForm)

EventForm = model_form(models.Event, db_session=db.session, base_class=RedirectForm)

UserForm = model_form(models.User, db_session=db.session, base_class=RedirectForm,
                     exclude = ['confirmed_at',
                                'last_login_at',
{'fraction_non_alphanumeric': 0.08866515102305944, 'fraction_numerical': 0.0006495615459564793, 'mean_word_length': 2.114256825075834, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1728952', 'n_tokens_mistral': 793, 'n_tokens_neox': 767, 'n_words': 165}