mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Copy accepted_renderer and accepted_media_type when cloing a request. Closes #1950.
This commit is contained in:
parent
571440e143
commit
2daf085100
|
@ -103,6 +103,10 @@ def clone_request(request, method):
|
||||||
ret._auth = request._auth
|
ret._auth = request._auth
|
||||||
if hasattr(request, '_authenticator'):
|
if hasattr(request, '_authenticator'):
|
||||||
ret._authenticator = 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
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user