Commit Graph
1 Commits
Author SHA1 Message Date
jonfoster 893ad6bb02 #629: Add HTTP response "streaming" attribute (#632)
Add the missing attribute django.http.response.StreamingHttpResponse.streaming .

This is actually done by moving the attribute from HttpResponse to the base class HttpResponseBase.

The real Django source code declares this attribute on HttpResponse and StreamingHttpResponse, however that's only because Django doesn't have type hints.  The right place for the type hint is on the base class HttpResponseBase, since all instances of that base class are actually instances of HttpResponse or StreamingHttpResponse or a subclass of those two classes.  So it's guaranteed that every HttpResponseBase instance has the attribute.

Fixes bug #629.
2021-06-03 21:25:25 +03:00