- Update the message to be consistent with the Django HttpResponseBase class. (#9287)

This commit is contained in:
Nguyễn Anh Bình 2024-03-17 20:22:03 +07:00 committed by GitHub
parent 2d8e9ad819
commit 337ba211e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)
)