I want to change templates when a button is clicked.
Here is my python code:
@app.route("/", methods = ['POST', 'GET'])
def my_forum_post():
    
    if request.method == 'POST':
        if request.form['myBtn'] == 'Sign in':
            return render_template('new_profile.html')
And here is my HTML code:
<form method = 'POST'>
      <input type="button" name="myBtn"  value="Sign in">
</form>
And the template which i want to swich to is called: new_profile.html
 
    