Horje
werkzeug.routing.BuildError: Could not build url for endpoint 'success'. Did you forget to specify values ['name']? Code Example
werkzeug.routing.BuildError: Could not build url for endpoint 'success'. Did you forget to specify values ['name']?
@app.route('/success/<name>')
def success(name):
    return 'welcome %s' % name

@app.route('/login', methods=['POST', 'GET'])
def login():
    if request.method == 'POST':
        user = request.form['nm']
        return redirect(url_for('success', name = user))

    return render_template(login.html)

if __name__ == "__main__":
    app.run(debug=True)




Python

Related
python 3 of 4 conditions true Code Example python 3 of 4 conditions true Code Example
fruit shop using list in python Code Example fruit shop using list in python Code Example
ImportError: cannot import name 'TextField' from 'wtforms' Code Example ImportError: cannot import name 'TextField' from 'wtforms' Code Example
hotel room allocation tool in python Code Example hotel room allocation tool in python Code Example
how to convert img to gray python Code Example how to convert img to gray python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8