parsers.DEFAULT_PARSERS added to be consistent with renderers.DEFAULT_RENDERERS

This commit is contained in:
Jens Alm 2011-07-02 19:03:26 +02:00
parent 1885012d61
commit f73588eb42
3 changed files with 8 additions and 3 deletions

1
.gitignore vendored
View File

@ -21,3 +21,4 @@ MANIFEST
.coverage .coverage
.tox .tox
.DS_Store .DS_Store
.idea/*

View File

@ -167,3 +167,9 @@ class MultiPartParser(BaseParser):
{'detail': 'multipart parse error - %s' % unicode(exc)}) {'detail': 'multipart parse error - %s' % unicode(exc)})
return django_parser.parse() return django_parser.parse()
DEFAULT_PARSERS = ( parsers.JSONParser,
parsers.FormParser,
parsers.MultiPartParser )
if YAMLParser:
DEFAULT_PARSERS += (YAMLParser,)

View File

@ -44,9 +44,7 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
""" """
List of parsers the resource can parse the request with. List of parsers the resource can parse the request with.
""" """
parsers = ( parsers.JSONParser, parsers = parsers.DEFAULT_PARSERS
parsers.FormParser,
parsers.MultiPartParser )
""" """
List of all authenticating methods to attempt. List of all authenticating methods to attempt.