diff options
| author | Tom Christie | 2014-09-26 10:46:52 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-09-26 10:46:52 +0100 |
| commit | 2859eaf524bca23f27e666d24a0b63ba61698a76 (patch) | |
| tree | 8acd1be737f9052577e130608a764d6197551d93 /rest_framework/negotiation.py | |
| parent | 417fe1b675bd1d42518fb89a6f81547caef5b735 (diff) | |
| download | django-rest-framework-2859eaf524bca23f27e666d24a0b63ba61698a76.tar.bz2 | |
request.data attribute
Diffstat (limited to 'rest_framework/negotiation.py')
| -rw-r--r-- | rest_framework/negotiation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/negotiation.py b/rest_framework/negotiation.py index ca7b5397..1838130a 100644 --- a/rest_framework/negotiation.py +++ b/rest_framework/negotiation.py @@ -38,7 +38,7 @@ class DefaultContentNegotiation(BaseContentNegotiation): """ # Allow URL style format override. eg. "?format=json format_query_param = self.settings.URL_FORMAT_OVERRIDE - format = format_suffix or request.QUERY_PARAMS.get(format_query_param) + format = format_suffix or request.query_params.get(format_query_param) if format: renderers = self.filter_renderers(renderers, format) @@ -87,5 +87,5 @@ class DefaultContentNegotiation(BaseContentNegotiation): Allows URL style accept override. eg. "?accept=application/json" """ header = request.META.get('HTTP_ACCEPT', '*/*') - header = request.QUERY_PARAMS.get(self.settings.URL_ACCEPT_OVERRIDE, header) + header = request.query_params.get(self.settings.URL_ACCEPT_OVERRIDE, header) return [token.strip() for token in header.split(',')] |
