diff options
| author | Windson yang <wiwindson@outlook.com> | 2018-04-02 23:39:29 +0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-04-04 10:19:12 -0400 |
| commit | a390cc710939365e58e6dc98ec282e532f71a3f9 (patch) | |
| tree | 92bf9b1dc9186b7c444c161fe8f931e122482e35 | |
| parent | e2b7ad435789eea6996aaeeff74637ee5243c61f (diff) | |
[2.0.x] Fixed #29278 -- Doc'd that a context manager can't be used with FileResponse.
Backport of 4fe5d846666d46a5395a5f0ea2845a96b6837a75 from master
| -rw-r--r-- | docs/ref/request-response.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index 77298b5bbf..aca839469b 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -1050,3 +1050,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. |
