My app takes some parameters from a form, uses it as input for another script, and then returns the output. How can I create a refresh button to redirect the user on the initial page without output? I tried this code in the template:
<form action= {{url_for('index')}} method='POST'>
<input type='submit' value="REFRESH">
</form>
But this gave me an error that the "View function did not return a response". I also tried:
<form action= {{redirect(url_for('index'))}} method='POST'>
<input type='submit' value="REFRESH">
</form>
But this gave me the error "'redirect' is undefined" even though my view imported both redirect and url_for.