diff options
| author | Tom Christie | 2013-02-04 21:16:34 +0000 | 
|---|---|---|
| committer | Tom Christie | 2013-02-04 21:16:34 +0000 | 
| commit | 0a38bc9db8c7ad5c1a9c8429ac799260c7257a39 (patch) | |
| tree | 1f9b0d797f5f3fbc6bcdaaeb8e5f95c9eab28669 /rest_framework/request.py | |
| parent | b052c92ac38f90e5b56cfd128cd4a488713c048e (diff) | |
| download | django-rest-framework-0a38bc9db8c7ad5c1a9c8429ac799260c7257a39.tar.bz2 | |
Deal with parser encodings properly
Diffstat (limited to 'rest_framework/request.py')
| -rw-r--r-- | rest_framework/request.py | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/rest_framework/request.py b/rest_framework/request.py index 16f47d16..482c8688 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -10,6 +10,7 @@ The wrapped request then offers a richer API, in particular :      - form overloading of HTTP method, content type and content  """  from __future__ import unicode_literals +from django.conf import settings  from django.http.multipartparser import parse_header  from rest_framework import HTTP_HEADER_ENCODING  from rest_framework import exceptions @@ -92,6 +93,7 @@ class Request(object):          if self.parser_context is None:              self.parser_context = {}          self.parser_context['request'] = self +        self.parser_context['encoding'] = request.encoding or settings.DEFAULT_CHARSET      def _default_negotiator(self):          return api_settings.DEFAULT_CONTENT_NEGOTIATION_CLASS() | 
