I think you never import HttpResponseBadRequest!