diff options
| author | Tom Christie | 2015-02-13 13:38:44 +0000 |
|---|---|---|
| committer | Tom Christie | 2015-02-13 13:38:44 +0000 |
| commit | 4248a8d3fc725d9ae3fe7aaaad7ee12479ab07ab (patch) | |
| tree | c38485aec717a35de8691c3d55bd50ba3e4aae6d /rest_framework/request.py | |
| parent | 84260b5dd66cc31858898ff11d5300a73083cca1 (diff) | |
| parent | ad32e14360a23ee3e93ff54ca206c64009d184c9 (diff) | |
| download | django-rest-framework-4248a8d3fc725d9ae3fe7aaaad7ee12479ab07ab.tar.bz2 | |
Merge pull request #2198 from tomchristie/version-3.1
Version 3.1
Diffstat (limited to 'rest_framework/request.py')
| -rw-r--r-- | rest_framework/request.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/rest_framework/request.py b/rest_framework/request.py index c4de9424..081ace23 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -108,6 +108,10 @@ def clone_request(request, method): ret.accepted_renderer = request.accepted_renderer if hasattr(request, 'accepted_media_type'): ret.accepted_media_type = request.accepted_media_type + if hasattr(request, 'version'): + ret.version = request.version + if hasattr(request, 'versioning_scheme'): + ret.versioning_scheme = request.versioning_scheme return ret @@ -216,8 +220,8 @@ class Request(object): Synonym for `.query_params`, for backwards compatibility. """ warnings.warn( - "`request.QUERY_PARAMS` is pending deprecation. Use `request.query_params` instead.", - PendingDeprecationWarning, + "`request.QUERY_PARAMS` is deprecated. Use `request.query_params` instead.", + DeprecationWarning, stacklevel=1 ) return self._request.GET @@ -237,8 +241,8 @@ class Request(object): arbitrary parsers, and also works on methods other than POST (eg PUT). """ warnings.warn( - "`request.DATA` is pending deprecation. Use `request.data` instead.", - PendingDeprecationWarning, + "`request.DATA` is deprecated. Use `request.data` instead.", + DeprecationWarning, stacklevel=1 ) if not _hasattr(self, '_data'): @@ -254,8 +258,8 @@ class Request(object): arbitrary parsers, and also works on methods other than POST (eg PUT). """ warnings.warn( - "`request.FILES` is pending deprecation. Use `request.data` instead.", - PendingDeprecationWarning, + "`request.FILES` is deprecated. Use `request.data` instead.", + DeprecationWarning, stacklevel=1 ) if not _hasattr(self, '_files'): |
