aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/exceptions.py
diff options
context:
space:
mode:
authorTom Christie2014-12-17 12:41:46 +0000
committerTom Christie2014-12-17 12:41:46 +0000
commit05a6eaec8aebdca2248b9e1069a15769fd85a480 (patch)
tree58488ee2e6533032d942dc65f038bbbc43462a87 /rest_framework/exceptions.py
parent70bd3a32f7cf57543e8ec08fddf001a718e40c7f (diff)
downloaddjango-rest-framework-05a6eaec8aebdca2248b9e1069a15769fd85a480.tar.bz2
More docs, plus 'ALLOWED_VERSIONS' setting.
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.")