I have a function, which renders my template when called:
def exampleTemplate():
exampleData = getData()
render_template(index.html, data=exampleData)
And I have something like an API, which is called from other sites. It manipulates the exampleData in exampleTemplate.
def exampleAPI():
manipulateExampleData()
return json()
How do I refresh the data with Ajax in exampleTemplate whenever the exampleData is manipulated via exampleAPI()?