aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/request.py
diff options
context:
space:
mode:
authorTom Christie2014-11-05 11:08:32 +0000
committerTom Christie2014-11-05 11:08:32 +0000
commit2daf085100b32fd4c13add0fcfa2dbb97722de4a (patch)
tree7b9b663dbaa1d50e35d46fac7b0dede99536c55a /rest_framework/request.py
parent571440e143870cf38230eea7c3a49df23d1eaa7c (diff)
downloaddjango-rest-framework-2daf085100b32fd4c13add0fcfa2dbb97722de4a.tar.bz2
Copy accepted_renderer and accepted_media_type when cloing a request. Closes #1950.
Diffstat (limited to 'rest_framework/request.py')
-rw-r--r--rest_framework/request.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/rest_framework/request.py b/rest_framework/request.py
index d4352742..096b3042 100644
--- a/rest_framework/request.py
+++ b/rest_framework/request.py
@@ -103,6 +103,10 @@ def clone_request(request, method):
ret._auth = request._auth
if hasattr(request, '_authenticator'):
ret._authenticator = request._authenticator
+ if hasattr(request, 'accepted_renderer'):
+ ret.accepted_renderer = request.accepted_renderer
+ if hasattr(request, 'accepted_media_type'):
+ ret.accepted_media_type = request.accepted_media_type
return ret