From 337ba211e82628c0a0bfc7340c45b22e725f8162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Anh=20B=C3=ACnh?= Date: Sun, 17 Mar 2024 20:22:03 +0700 Subject: [PATCH] - Update the message to be consistent with the Django `HttpResponseBase` class. (#9287) --- rest_framework/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/views.py b/rest_framework/views.py index 4c30029fd..411c1ee38 100644 --- a/rest_framework/views.py +++ b/rest_framework/views.py @@ -421,7 +421,7 @@ class APIView(View): """ # Make the error obvious if a proper response is not returned assert isinstance(response, HttpResponseBase), ( - 'Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` ' + 'Expected a `Response`, `HttpResponse` or `StreamingHttpResponse` ' 'to be returned from the view, but received a `%s`' % type(response) )