diff options
| author | Nikolaus Schlemm | 2013-05-18 17:10:13 +0200 | 
|---|---|---|
| committer | Nikolaus Schlemm | 2013-05-18 17:10:13 +0200 | 
| commit | b4dbfa9832e2a29a5908ddf27f8746971a8e3c56 (patch) | |
| tree | 1d16fd5237197acda1db8f555575235aefef68fa /rest_framework/views.py | |
| parent | f8c1481d4b927d8cd16406d805597ded44bb3f1c (diff) | |
| download | django-rest-framework-b4dbfa9832e2a29a5908ddf27f8746971a8e3c56.tar.bz2 | |
only catch relevant exceptions ;)
Diffstat (limited to 'rest_framework/views.py')
| -rw-r--r-- | rest_framework/views.py | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/rest_framework/views.py b/rest_framework/views.py index 2dd2c59e..719df428 100644 --- a/rest_framework/views.py +++ b/rest_framework/views.py @@ -83,7 +83,10 @@ class APIView(View):                          field_name_types[name] = field.__class__.__name__                  actions[method] = field_name_types -            except: +            except exceptions.PermissionDenied: +                # don't add this method +                pass +            except exceptions.NotAuthenticated:                  # don't add this method                  pass | 
