aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/parsers.py
diff options
context:
space:
mode:
authorTom Christie2011-04-25 04:50:28 +0100
committerTom Christie2011-04-25 04:50:28 +0100
commit762a52edde09297e87c640797219c9bb8255d50a (patch)
treec68aff4f73e988fd2ee2cec827bd3ec528fa6e22 /djangorestframework/parsers.py
parent84a4fd3ea11a55441cb5b8acd584c76fc325edcc (diff)
downloaddjango-rest-framework-762a52edde09297e87c640797219c9bb8255d50a.tar.bz2
Fix some compat issues with json/simplejson
Diffstat (limited to 'djangorestframework/parsers.py')
-rw-r--r--djangorestframework/parsers.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/djangorestframework/parsers.py b/djangorestframework/parsers.py
index 707b61d5..caa76277 100644
--- a/djangorestframework/parsers.py
+++ b/djangorestframework/parsers.py
@@ -9,20 +9,13 @@ We need a method to be able to:
and multipart/form-data. (eg also handle multipart/json)
"""
from django.http.multipartparser import MultiPartParser as DjangoMPParser
+from django.utils import simplejson as json
+
from djangorestframework.response import ErrorResponse
from djangorestframework import status
from djangorestframework.utils import as_tuple
from djangorestframework.mediatypes import MediaType
-
-try:
- import json
-except ImportError:
- import simplejson as json
-
-try:
- from urlparse import parse_qs
-except ImportError:
- from cgi import parse_qs
+from djangorestframework.compat import parse_qs