diff options
Diffstat (limited to 'rest_framework/exceptions.py')
| -rw-r--r-- | rest_framework/exceptions.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index 1f381e4e..bcfd8961 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.") |
