diff options
| author | Collin Anderson <cmawebsite@gmail.com> | 2015-01-03 12:06:24 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-01-05 10:51:52 -0500 |
| commit | 3d2cae0896ee8026d1c2c5d31e4c4c8f74f2fef4 (patch) | |
| tree | 1abf00da86cd8831b829124a32058ea589b78b3c /tests/wsgi/urls.py | |
| parent | 05f702b94ca4ad77236a1e299270e8014def02e6 (diff) | |
Fixed #24072 -- Added FileResponse for streaming binary files.
Diffstat (limited to 'tests/wsgi/urls.py')
| -rw-r--r-- | tests/wsgi/urls.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/wsgi/urls.py b/tests/wsgi/urls.py index 3ed0d5e8a8..e7505c717b 100644 --- a/tests/wsgi/urls.py +++ b/tests/wsgi/urls.py @@ -1,5 +1,5 @@ from django.conf.urls import url -from django.http import HttpResponse +from django.http import HttpResponse, FileResponse def helloworld(request): @@ -7,4 +7,5 @@ def helloworld(request): urlpatterns = [ url("^$", helloworld), + url(r'^file/$', lambda x: FileResponse(open(__file__, 'rb'))), ] |
