def salvar(): squad = Squad() squad.ID = request.args['ID'] squad.NOME = request.args['NOME'] squad.DESCRICAO = request.args['DESCRICAO'] squad.NUMEROPESOSAS = request.args['NUMEROPESSOAS'] FRAMEWORK = Framework() FRAMEWORK.ID = request.args['ID'] FRAMEWORK.NOME = request.args['NOME'] LINGUAGEM = Backend() FRAMEWORK.ID = request.args['ID'] FRAMEWORK.NOME = request.args['NOME'] SGBD = Sgbd() FRAMEWORK.ID = request.args['3ID'] FRAMEWORK.NOME = request.args['NOME'] squad.framework = end squad.sackend = end1 squad.sgbd = end2 if squad.id == 0: squad_controller.salvar(squad) else: squad_controller.alterar(squad) return redirect('/listar')
def cadastrar(): squad = Squad() squad.framework = Framework() squad.backend = Backend() squad.sgbd = Sgbd() if 'id' in request.args: id = request.args['id'] squad = squad_controller.buscar_por_id(id) return render_template('formulario.html', titulo_app = nome, squad = squad )