aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/exceptions.py
diff options
context:
space:
mode:
authorTom Christie2014-12-17 12:54:31 +0000
committerTom Christie2014-12-17 12:54:31 +0000
commit47fe6977077ae33dfe2f8b6d04d81083b9b9f4d7 (patch)
tree58488ee2e6533032d942dc65f038bbbc43462a87 /rest_framework/exceptions.py
parentb6ee784240b3c7f6cd62af5b6fe6d1014d7bf6d4 (diff)
parent05a6eaec8aebdca2248b9e1069a15769fd85a480 (diff)
downloaddjango-rest-framework-47fe6977077ae33dfe2f8b6d04d81083b9b9f4d7.tar.bz2
Merge pull request #2285 from tomchristie/versioning
Versioning
Diffstat (limited to 'rest_framework/exceptions.py')
-rw-r--r--rest_framework/exceptions.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py
index be41d08d..238934db 100644
--- a/rest_framework/exceptions.py
+++ b/rest_framework/exceptions.py
@@ -89,6 +89,11 @@ class PermissionDenied(APIException):
default_detail = _('You do not have permission to perform this action.')
+class NotFound(APIException):
+ status_code = status.HTTP_404_NOT_FOUND
+ default_detail = _('Not found')
+
+
class MethodNotAllowed(APIException):
status_code = status.HTTP_405_METHOD_NOT_ALLOWED
default_detail = _("Method '%s' not allowed.")