Quick question...
I have an input box that upon key enter, adds the value to an unordered list. How would I pass this unordered list to jquery post? I\'m using the f
Something similar works with Pythons Flask, but you have to use request.form.getlist(arg) instead of just "get".
In fruits.html:
In app.py:
@app.route('/fruits', methods=['GET', 'POST'])
def get_fruits():
if request.method == 'POST':
fruits = request.form.getlist("fruits")
print fruits
return render_template(fruits.html)
This will print out:
['Apple', 'Pear', 'Banana']