I want to open a new page in a new tab (Similar to window.open) using flask webApp and also pass parameters from the parent page to the child window and based on those parameters get data from database and show on the child window
<title> Parent Page </title>
window.open('child.html') // pass parameters parameter1, parameter2
Flask Code:
@app.route('/')
def renderParentPage():
return render_template('parentPage.html')
@app.route('/<string:page_name>/')
def render_static(page_name):
print('%s' % page_name)
dataTosend = getBrandData("Parameters from parent page- parameter1, parameter2")
return render_template('%s' % page_name, dataToSend=dataTosend)