Werkzeug/Flask as already parsed everything for you. No need to do the same work again with urlparse:
from flask import request
@app.route('/')
@app.route('/data')
def data():
query_string = request.query_string ## There is it
return render_template("data.html")
The full documentation for the request and response objects is in Werkzeug: http://werkzeug.pocoo.org/docs/wrappers/