aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/modelresource.py
diff options
context:
space:
mode:
authorTom Christie2011-04-11 16:38:00 +0100
committerTom Christie2011-04-11 16:38:00 +0100
commit349ffcaf5f03b55d8ffe92999814ba97da5ca870 (patch)
treeb12c6fd3504af09000d480a8f38c1b76d095afda /djangorestframework/modelresource.py
parenta1ed565081779e3f50e9f0ff280a813a46f3613d (diff)
downloaddjango-rest-framework-349ffcaf5f03b55d8ffe92999814ba97da5ca870.tar.bz2
Rename mixins into Mixin class, rename ResponseException to ErrorResponse, remove NoContent
Diffstat (limited to 'djangorestframework/modelresource.py')
-rw-r--r--djangorestframework/modelresource.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/djangorestframework/modelresource.py b/djangorestframework/modelresource.py
index 7fa37053..b0a4b1c1 100644
--- a/djangorestframework/modelresource.py
+++ b/djangorestframework/modelresource.py
@@ -3,7 +3,7 @@ from django.db.models import Model
from django.db.models.query import QuerySet
from django.db.models.fields.related import RelatedField
-from djangorestframework.response import Response, ResponseException
+from djangorestframework.response import Response, ErrorResponse
from djangorestframework.resource import Resource
from djangorestframework import status, validators
@@ -370,7 +370,7 @@ class ModelResource(Resource):
# Otherwise assume the kwargs uniquely identify the model
instance = self.model.objects.get(**kwargs)
except self.model.DoesNotExist:
- raise ResponseException(status.HTTP_404_NOT_FOUND)
+ raise ErrorResponse(status.HTTP_404_NOT_FOUND)
return instance
@@ -402,7 +402,7 @@ class ModelResource(Resource):
# Otherwise assume the kwargs uniquely identify the model
instance = self.model.objects.get(**kwargs)
except self.model.DoesNotExist:
- raise ResponseException(status.HTTP_404_NOT_FOUND, None, {})
+ raise ErrorResponse(status.HTTP_404_NOT_FOUND, None, {})
instance.delete()
return