So basically I have two functions
@app.route('/index', methods=['GET'])
def do_stuff1():
*LOGIC*
return (render_template('index.html', data=data))
and
@app.route('/index', methods=['GET'])
def do_stuff2():
*LOGIC*
return (render_template('index.html', moreData=moreData))
How do I pass through the data from the second function to the the same template because it's not working as I have specified there. I'm only getting the first functions data.
EDIT: I should have specified that I want to use the data within the same route.
dataandmoreDatashould be produced by two standard (undecorated) functions. Then write a third method with theapp.routedecorator that calls each of them and merges their returns.