summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
authorNicolas Restrepo <nrestrepo.r05@gmail.com>2021-06-17 07:04:04 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-06-22 21:28:48 +0200
commitbbb3965826c91406b94b819af7315ea1d39ec217 (patch)
treede6ddcce62f1bdefc9531e48fa2448e0952099c8 /django/http
parent7a9745fed498f69c46a3ffa5dfaff872e0e1df89 (diff)
Refs #24121 -- Added __repr__() to StreamingHttpResponse and subclasses.
Diffstat (limited to 'django/http')
-rw-r--r--django/http/response.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/django/http/response.py b/django/http/response.py
index 99f0020335..901501dad1 100644
--- a/django/http/response.py
+++ b/django/http/response.py
@@ -402,6 +402,13 @@ class StreamingHttpResponse(HttpResponseBase):
# See the `streaming_content` property methods.
self.streaming_content = streaming_content
+ def __repr__(self):
+ return '<%(cls)s status_code=%(status_code)d%(content_type)s>' % {
+ 'cls': self.__class__.__qualname__,
+ 'status_code': self.status_code,
+ 'content_type': self._content_type_for_repr,
+ }
+
@property
def content(self):
raise AttributeError(