From 6c109ac60f891955df367c61d4d7094039098076 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 13 Sep 2012 18:32:56 +0100 Subject: Improve throttles and docs --- djangorestframework/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'djangorestframework/views.py') 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): -- cgit v1.2.3