Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
ce31e369
Commit
ce31e369
authored
Mar 05, 2015
by
Egor Yurtaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `MergeDict`
The class MergeDict is deprecated and will be removed in Django 1.9
parent
f7917928
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
rest_framework/request.py
+4
-12
No files found.
rest_framework/request.py
View file @
ce31e369
...
...
@@ -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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment