
    name = StringField('Name', [validators.Length(min=1)])
    expression = StringField('Expression', [validators.Length(min=1)])

class EventForm(Form):

    qry_rules = db_session.query(Rules).all()
    rules_list = [(r.id, r.name) for r in qry_rules]
    print rules_list