Ask coding questions

← Back to all posts
405 Method not allowed error with flask_wtf
isaiah08 (86)

I am re-writing this post because i didn't phrase it correctly the first time. Try running the program, entering test as the username and pass as the password, and you get a 405 error. How can i fix this?

Comments
hotnewtop
Coder100 (18812)

hmmm try making sure that the quick form is posting to the correct URL endpoint. It is currently posting to /, and you didn't specify a handler for a post request to that

isaiah08 (86)

Thanks! One more question: when you go to /posts, it gives you a 500 error. What is wrong now? @Coder100

Coder100 (18812)

make sure you actually return something like return 'done!' @isaiah08

Coder100 (18812)

so like something like this:

@app.route('/empty-view/')
def empty_view(self):
    content = {'please move along': 'nothing to see here'}
    return content, 405

is that what you want?

isaiah08 (86)

That's not what i want, thanks! I rewrote the post, read it again. @Coder100

Whippingdot (678)

Wait both of you, bro @Coder100 you are on the project. You don't even have to answer here. This is for our project, and it is for the suggestions page. @isaiah08 was just asking cause no-one was finishing it. Come to the repl here or here. The first one is staging. and the second is normal. Quickly make the suggestions page work both of you, we only have 2 days left. Use python or whatever to make it work. Send the output to a txt file.

isaiah08 (86)

Umm... this is not for the repl.it 2020 site. This is flask, and on the 2020 site we are using node.js. This is another thing that i am working [email protected]