lingthio/Flask-User

new view works when using get method, but doesn't work when using post method with 400 bad request error.

Opened this issue · 2 comments

When I use flask, both get method and post method work very well. but when I change to flask-user 1.0, only the get method work, all the views requested from post method didn't work. What's wrong?

Here are code:
in main_views.py:

@main_blueprint.route('/main/test', methods=['GET', 'POST'])
def test_page():
    print("***** request is ", request)
    return redirect(url_for('main.home_page'))

in the html file:

 <form action="/main/test" method="post" id="test">
    <input type="text" class="form-control" name="address">
    <button type="submit" class="btn">Submit</button>
 </form>

If method="get" it worked well, if method="post" then got Bad Request error.

Please help. Thanks.

anybody can help?

Is this still a problem?