def ddl_make(name): ddl = DDL.query.filter_by(title=name).first() ddls = [] ddls.append(ddl) make_ddl(ddls) flash("successfully made.") return redirect(url_for('ddl_choose'))
def ddl_select(): all_ddls = DDL.query.all() ddls = [] selected = request.form selected_ddls = "" for ddlname in selected: ddl = DDL.query.filter_by(title=ddlname).first() ddls.append(ddl) selected_ddls += ddl.title selected_ddls += "," session['ddlnames'] = selected_ddls ddls.reverse() make_ddl(ddls) #flash("successfully made.") return redirect(url_for('task_choose'))