summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorWindson yang <wiwindson@outlook.com>2018-04-02 23:39:29 +0800
committerTim Graham <timograham@gmail.com>2018-04-04 09:56:49 -0400
commit4fe5d846666d46a5395a5f0ea2845a96b6837a75 (patch)
tree8f0291a5a52e150253a52eb1b8a9787a7f03e2ff /docs
parente6c21217d3c79a507ebab290ba41116407dd7f2a (diff)
downloaddjango-4fe5d846666d46a5395a5f0ea2845a96b6837a75.tar.gz
Fixed #29278 -- Doc'd that a context manager can't be used with FileResponse.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/request-response.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index e2e8e4cec1..c088186001 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -1057,3 +1057,5 @@ otherwise it streams the file out in small chunks.
>>> from django.http import FileResponse
>>> response = FileResponse(open('myfile.png', 'rb'))
+
+The file will be closed automatically, so don't open it with a context manager.