diff options
| author | José Padilla | 2015-03-06 19:17:58 -0400 | 
|---|---|---|
| committer | José Padilla | 2015-03-06 19:17:58 -0400 | 
| commit | 0e21f1c4f4cd91551cd6021a8ca03a6911feac44 (patch) | |
| tree | d6c2ee2a9dd683d02249ebc71d466eab634ee6ea | |
| parent | 3d0aaa9df2c0fa9427a869e865214200c4998d10 (diff) | |
| parent | ce31e369734bd6db1a5a1a94bb1679e6bbbf34b3 (diff) | |
| download | django-rest-framework-0e21f1c4f4cd91551cd6021a8ca03a6911feac44.tar.bz2 | |
Merge pull request #2640 from Crystalnix/fix-remove-mergedict
Remove `MergeDict`
| -rw-r--r-- | rest_framework/request.py | 16 | 
1 files changed, 4 insertions, 12 deletions
diff --git a/rest_framework/request.py b/rest_framework/request.py index fd4f6a3e..e4b5bc26 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -14,7 +14,6 @@ from django.http import QueryDict  from django.http.multipartparser import parse_header  from django.utils import six  from django.utils.datastructures import MultiValueDict -from django.utils.datastructures import MergeDict as DjangoMergeDict  from rest_framework import HTTP_HEADER_ENCODING  from rest_framework import exceptions  from rest_framework.settings import api_settings @@ -61,15 +60,6 @@ class override_method(object):              self.view.action = self.action -class MergeDict(DjangoMergeDict, dict): -    """ -    Using this as a workaround until the parsers API is properly -    addressed in 3.1. -    """ -    def __init__(self, *dicts): -        self.dicts = dicts - -  class Empty(object):      """      Placeholder for unset attributes. @@ -328,7 +318,8 @@ class Request(object):          if not _hasattr(self, '_data'):              self._data, self._files = self._parse()              if self._files: -                self._full_data = MergeDict(self._data, self._files) +                self._full_data = self._data.copy() +                self._full_data.update(self._files)              else:                  self._full_data = self._data @@ -392,7 +383,8 @@ class Request(object):          # At this point we're committed to parsing the request as form data.          self._data = self._request.POST          self._files = self._request.FILES -        self._full_data = MergeDict(self._data, self._files) +        self._full_data = self._data.copy() +        self._full_data.update(self._files)          # Method overloading - change the method and remove the param from the content.          if (  | 
