@@ -35,7 +35,6 @@ class BaseParser(object):
35
35
All parsers should extend `BaseParser`, specifying a `media_type`
36
36
attribute, and overriding the `.parse()` method.
37
37
"""
38
-
39
38
media_type = None
40
39
41
40
def parse (self , stream , media_type = None , parser_context = None ):
@@ -51,7 +50,6 @@ class JSONParser(BaseParser):
51
50
"""
52
51
Parses JSON-serialized data.
53
52
"""
54
-
55
53
media_type = 'application/json'
56
54
renderer_class = renderers .JSONRenderer
57
55
@@ -73,7 +71,6 @@ class FormParser(BaseParser):
73
71
"""
74
72
Parser for form data.
75
73
"""
76
-
77
74
media_type = 'application/x-www-form-urlencoded'
78
75
79
76
def parse (self , stream , media_type = None , parser_context = None ):
@@ -91,7 +88,6 @@ class MultiPartParser(BaseParser):
91
88
"""
92
89
Parser for multipart form data, which may include file data.
93
90
"""
94
-
95
91
media_type = 'multipart/form-data'
96
92
97
93
def parse (self , stream , media_type = None , parser_context = None ):
@@ -131,7 +127,6 @@ def parse(self, stream, media_type=None, parser_context=None):
131
127
`.data` will be None (we expect request body to be a file content).
132
128
`.files` will be a `QueryDict` containing one 'file' element.
133
129
"""
134
-
135
130
parser_context = parser_context or {}
136
131
request = parser_context ['request' ]
137
132
encoding = parser_context .get ('encoding' , settings .DEFAULT_CHARSET )
0 commit comments