Back
Not obvious from the flask documentation on how to get the query string. I am new, looked at the docs, could not find!
So
@app.route('/')@app.route('/data')def data():query_string=??????return render_template("data.html")
@app.route('/')
@app.route('/data')
def data():
query_string=??????
return render_template("data.html")
To get a query string on Flask you can use the following piece of code:-
from flask import request@app.route('/data')def data(): user = request.args.get('user')
from flask import request
user = request.args.get('user')
31k questions
32.8k answers
501 comments
693 users