diff options
| author | Tom Christie | 2013-06-13 00:10:23 -0700 |
|---|---|---|
| committer | Tom Christie | 2013-06-13 00:10:23 -0700 |
| commit | 170709442bb3f53bd2b49414cdff0495e7d6c9eb (patch) | |
| tree | 2168c40e527b3ff9cc54fbd14fdb823799bbf280 /rest_framework/throttling.py | |
| parent | de00ec95c3007dd90b5b01f7486b430699ea63c1 (diff) | |
| parent | 2ed79b6dc626cb2fcc1bfc119ef5757c590bb983 (diff) | |
| download | django-rest-framework-170709442bb3f53bd2b49414cdff0495e7d6c9eb.tar.bz2 | |
Merge pull request #931 from mindlace-mp/writable-nested-modelserializer
Merged master into writable-nested-modelserializer.
Diffstat (limited to 'rest_framework/throttling.py')
| -rw-r--r-- | rest_framework/throttling.py | 6 |
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): """ |
