def insert_advice(self, form): session = db_session() new_advice = Advice(id=uuid.uuid4(), name=form.name.data, major=form.major.data, email=form.email.data, advice=form.advice.data) session.add(new_advice) session.commit() session.close()
def insert_applicant(self, form): session = db_session() new_applicant = Applicant(id=uuid.uuid4(), name=form.name.data, gender=form.gender.data, campus=form.campus.data, major=form.major.data, contact=form.contact.data, backup_contact=form.backup_contact.data, group=form.group.data, intro=form.intro.data) session.add(new_applicant) session.commit() session.close()