Skip to content Skip to sidebar Skip to footer

Flask Receiving No Data For Html Post

@app.route('/', methods=['GET', 'POST']) def login(): if request.method == 'GET': if 'USER_TOKEN' in session: return make_response(render_template('index.ht

Solution 1:

You are missing field names (which are keys for ImmutableMultiDict, that's why it appears to be empty when form gets submitted).

change

<inputtype="text"id="email" placeholder="Email">

to

<input name="<whatever_email_name>"type="text"id="email" placeholder="Email">

and

<inputtype="password"id="password" placeholder="Password">

to

<input name="<whatever_password_name>"type="password"id="password" placeholder="Password">

Post a Comment for "Flask Receiving No Data For Html Post"