Change object_or_404 to HttpResponseNotFound