diff options
| author | Tom Christie | 2011-04-11 16:38:00 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-04-11 16:38:00 +0100 |
| commit | 349ffcaf5f03b55d8ffe92999814ba97da5ca870 (patch) | |
| tree | b12c6fd3504af09000d480a8f38c1b76d095afda /djangorestframework/parsers.py | |
| parent | a1ed565081779e3f50e9f0ff280a813a46f3613d (diff) | |
| download | django-rest-framework-349ffcaf5f03b55d8ffe92999814ba97da5ca870.tar.bz2 | |
Rename mixins into Mixin class, rename ResponseException to ErrorResponse, remove NoContent
Diffstat (limited to 'djangorestframework/parsers.py')
| -rw-r--r-- | djangorestframework/parsers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/djangorestframework/parsers.py b/djangorestframework/parsers.py index 11adeb78..707b61d5 100644 --- a/djangorestframework/parsers.py +++ b/djangorestframework/parsers.py @@ -9,7 +9,7 @@ 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 djangorestframework.response import ResponseException +from djangorestframework.response import ErrorResponse from djangorestframework import status from djangorestframework.utils import as_tuple from djangorestframework.mediatypes import MediaType @@ -59,7 +59,7 @@ class JSONParser(BaseParser): try: return json.load(stream) except ValueError, exc: - raise ResponseException(status.HTTP_400_BAD_REQUEST, {'detail': 'JSON parse error - %s' % str(exc)}) + raise ErrorResponse(status.HTTP_400_BAD_REQUEST, {'detail': 'JSON parse error - %s' % str(exc)}) class DataFlatener(object): |
