mercredi 30 mai 2018

How to get checkbox data as variable in Flask?

I'm trying to develop a web app using flask framework now am stuck with a problem .i have a list, Each item in this list needed to include the values of a checkbox and how to get the checkbox values as a variable?

pro.py

@app.route('/',methods=['POST'])
def ExcelEntery():
   Excel1=request.form['excel1']
   Excel2=request.form['excel2']
   print(Excel1)
   import ashi
   a,b=ashi.excelExtraxt(Excel1,Excel2)
   return render_template('Excel_feild_select.html',response=a,action=b)

@app.route('/Excel_feild_select',methods=['POST'])
def GetColumn():
   if request.method =='POST':
     val1=request.form.getlist('coloumn'))
     val2=request.values.get('coloumn2'))
     import Extract
     ans=Extract.add(val1,val2)

     return render_template('index.html')

sample.html`

     Liquid error: Unknown operator is




Aucun commentaire:

Enregistrer un commentaire