Commits

Jens Alm  committed 28fb439

parsers.DEFAULT_PARSERS added to be consistent with renderers.DEFAULT_RENDERERS

  • Participants
  • Parent commits 48ae2d2

Comments (0)

Files changed (3)

 .coverage
 .tox
 .DS_Store
+.idea/*

File djangorestframework/parsers.py

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

File djangorestframework/views.py

     """
     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.