aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/throttling.py
diff options
context:
space:
mode:
authorEthan Fremen2013-06-10 10:29:25 -0700
committerEthan Fremen2013-06-10 10:29:25 -0700
commit0e75bcd2592caa8862e0b0166a6b851a3eada749 (patch)
tree4be625563775f1cab06219d3a7a5a62c0ff74bfd /rest_framework/throttling.py
parentde00ec95c3007dd90b5b01f7486b430699ea63c1 (diff)
parent5d0aeef69ecec70242513195c19edcb622e14371 (diff)
downloaddjango-rest-framework-0e75bcd2592caa8862e0b0166a6b851a3eada749.tar.bz2
Merge remote-tracking branch 'upstream/master' into writable-nested-modelserializer
Diffstat (limited to 'rest_framework/throttling.py')
-rw-r--r--rest_framework/throttling.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/rest_framework/throttling.py b/rest_framework/throttling.py
index 93ea9816..9d89d1cb 100644
--- a/rest_framework/throttling.py
+++ b/rest_framework/throttling.py
@@ -3,7 +3,7 @@ Provides various throttling policies.
"""
from __future__ import unicode_literals
from django.core.cache import cache
-from rest_framework import exceptions
+from django.core.exceptions import ImproperlyConfigured
from rest_framework.settings import api_settings
import time
@@ -65,13 +65,13 @@ class SimpleRateThrottle(BaseThrottle):
if not getattr(self, 'scope', None):
msg = ("You must set either `.scope` or `.rate` for '%s' throttle" %
self.__class__.__name__)
- raise exceptions.ConfigurationError(msg)
+ raise ImproperlyConfigured(msg)
try:
return self.settings.DEFAULT_THROTTLE_RATES[self.scope]
except KeyError:
msg = "No default throttle rate set for '%s' scope" % self.scope
- raise exceptions.ConfigurationError(msg)
+ raise ImproperlyConfigured(msg)
def parse_rate(self, rate):
"""