mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-21 17:16:47 +03:00
parsers.DEFAULT_PARSERS added to be consistent with renderers.DEFAULT_RENDERERS
This commit is contained in:
parent
1885012d61
commit
f73588eb42
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -21,3 +21,4 @@ MANIFEST
|
|||
.coverage
|
||||
.tox
|
||||
.DS_Store
|
||||
.idea/*
|
|
@ -167,3 +167,9 @@ class MultiPartParser(BaseParser):
|
|||
{'detail': 'multipart parse error - %s' % unicode(exc)})
|
||||
return django_parser.parse()
|
||||
|
||||
DEFAULT_PARSERS = ( parsers.JSONParser,
|
||||
parsers.FormParser,
|
||||
parsers.MultiPartParser )
|
||||
|
||||
if YAMLParser:
|
||||
DEFAULT_PARSERS += (YAMLParser,)
|
||||
|
|
|
@ -44,9 +44,7 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
|
|||
"""
|
||||
List of parsers the resource can parse the request with.
|
||||
"""
|
||||
parsers = ( parsers.JSONParser,
|
||||
parsers.FormParser,
|
||||
parsers.MultiPartParser )
|
||||
parsers = parsers.DEFAULT_PARSERS
|
||||
|
||||
"""
|
||||
List of all authenticating methods to attempt.
|
||||
|
|
Loading…
Reference in New Issue
Block a user