Program:

@app.route('/new', methods=["GET", "POST"]) def new(): if request.method == "POST": return "true"+request.form['title'] return render_template("new.html") 

Template:

 <form name="NP" action="{{ url_for('new') }}" method="POST"> <input name="title" type= "text" placeholder="Title"> </form> 

When trying to send, it throws wärkzeug.exceptions.BadRequestKeyError.

How to make it work?

    0