diff options
| author | Tom Christie | 2014-12-17 12:41:46 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-12-17 12:41:46 +0000 |
| commit | 05a6eaec8aebdca2248b9e1069a15769fd85a480 (patch) | |
| tree | 58488ee2e6533032d942dc65f038bbbc43462a87 /rest_framework/exceptions.py | |
| parent | 70bd3a32f7cf57543e8ec08fddf001a718e40c7f (diff) | |
| download | django-rest-framework-05a6eaec8aebdca2248b9e1069a15769fd85a480.tar.bz2 | |
More docs, plus 'ALLOWED_VERSIONS' setting.
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 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.") |
