def post(self): project_name = request.form['project_name'] project = Project() project.project_name = project_name db.session.add(project) db.session.commit() return project.to_dict()
def post(self): project_name = request.form['project_name'] project = Project() project.project_name = project_name try: db.session.add(project) db.session.commit() except: db.session.rollback() raise return project.to_dict()