diff options
| author | Tom Christie | 2012-09-13 18:32:56 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-09-13 18:32:56 +0100 |
| commit | 6c109ac60f891955df367c61d4d7094039098076 (patch) | |
| tree | 813962df0083994aa70e9e5c3f81f8bc677a583b /djangorestframework/views.py | |
| parent | b16c45aa6dfb5937d01f0c89273cd24f5e729f60 (diff) | |
| download | django-rest-framework-6c109ac60f891955df367c61d4d7094039098076.tar.bz2 | |
Improve throttles and docs
Diffstat (limited to 'djangorestframework/views.py')
| -rw-r--r-- | djangorestframework/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/djangorestframework/views.py b/djangorestframework/views.py index 5ec55d8c..a309386b 100644 --- a/djangorestframework/views.py +++ b/djangorestframework/views.py @@ -186,7 +186,7 @@ class APIView(_View): Check if request should be permitted. """ for permission in self.get_permissions(): - if not permission.check_permission(request, obj): + if not permission.has_permission(request, obj): self.permission_denied(request) def check_throttles(self, request): @@ -194,7 +194,7 @@ class APIView(_View): Check if request should be throttled. """ for throttle in self.get_throttles(): - if not throttle.check_throttle(request): + if not throttle.allow_request(request): self.throttled(request, throttle.wait()) def initialize_request(self, request, *args, **kargs): |
