Flask 405 Method Not Allowed how to fix

Chikky's Avatar


19 Jan, 2021 10:14 AM

@app.route('/xxxr') def page_decider():
global buttonclicked if request.method == 'POST': if request.form.get("submit_1"): buttonclicked = buttonclicked + 1 else : return else: return

if buttonclicked == 1:
    return render_template("3xxx-1.html")
elif buttonclicked == 2:
    return render_template("xxx-1.html")
elif buttonclicked == 3:
    return render_template("xxx-1.html")
    return render_template('xx.html')

when i run the website when the website uses this function to displaywhat is the next page to be displied it is shoing 405 error
please anyone can help me solve this problem

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac