Opened 4 years ago

Last modified 4 years ago

#31816 closed Cleanup/optimization

StreamingHttpResponse docs incorrectly specifies strings — at Initial Version

Reported by: Lincoln Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

In the docs for StreamingHttpResponse https://docs.djangoproject.com/en/dev/ref/request-response/#streaminghttpresponse-objects

It says that "It should be given an iterator that yields strings as content."

But in the class there is

    def getvalue(self):
        return b''.join(self.streaming_content)

So I think the docs should specify that it be given an iterator of bytestrings instead.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top