title: When to use HttpResponseBadRequest (http 400) in Django
body: <p>I've been using HttpResponseBadRequest (http 400) quite a bit in Django recently. I became curious about what it means exactly, and I came across <a href="https://stackoverflow.com/questions/16133923/400-vs-422-response-to-post-of-data">this question</a>. According to the accepted answer there it sounds like using HttpResponseBadRequest in a view is <em>always</em> wrong by definition. </p>
  
  <p>I use it for situations where a view receives incorrect input or is called under the wrong circumstances, which could only be caused by a user with bad intentions entering bad data (or from bugs in my code).</p>
  
  <p>The <a href="https://docs.djangoproject.com/en/1.7/ref/request-response/#httpresponse-subclasses" rel="nofollow noreferrer">alternative HttpResponses</a> all seem like worse choices in this case. How is HttpResponseBadRequest used by most Django developers? The documentation doesn't seem to explain what to use the different classes for. </p>