I have a website with a login form. My problem is that every time this form is submitted, chrome suggests to save the password, even if it's incorrect
The form:
<form method="POST" action="" id='sign-in'> {% csrf_token %} <div class="form-group inner-addon"> <input name="txt_login_username" type="text" class="form-control" placeholder="Username"> <i class="fa fa-user fa-lg fa-fw" aria-hidden="true"></i> </div> <div class="form-group inner-addon"> <input name="txt_login_pass" type="password" class="form-control" placeholder="Password"> <i class="fa fa-key fa-lg fa-fw" aria-hidden="true"></i> </div> {% for message in messages %} <p class='alert alert-danger'>{{ message }}</p> {% endfor %} <button type="submit" class="btn btn-primary" name="btn_login">Log In</button> </form>
I figured it out with the help of @deceze. just need to add state=400 to the render method:
render(request, 'index.html', context, status=400)
2.1m questions
2.1m answers
60 comments
57.0k users