Flask 405 Method Not Allowed how to fix

Chikky's Avatar

Chikky

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")
else:
    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

Generic

? 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

Recent Discussions

24 Nov, 2021 09:31 PM
22 Nov, 2021 03:30 AM
16 Oct, 2021 02:37 PM
28 Jul, 2021 01:18 PM
26 May, 2021 01:13 PM